Javascript & XML

wxdqz

New Member
I have an XML JS related Question.

I have a JScript that generates dropdown box like this-

td2.innerHTML = "<select size=1 name='"+name+"' id='"+name+"'><option selected>Select a Type<option value=http://www.webdeveloper.com/forum/archive/index.php/1>String<option value=2>Float<option value=3>Integer</select>";

I dont want to hardcode the option values within the JS.I need to be able to extract these values from an XML document.How can I do this

My XML structure is something like this:

<options>
<option value="1">string</string>
<option value="2">Integer</string>
<option value="3">Float</string>
</options>

Thanks,
 
Back
Top