output = document.getElementById("products");
output.innerHTML = "<select>";
for(i=0;i<= xmlObj.childNodes.length;i++)
{
output.innerHTML += ("<option value='"+i+"'>"+ xmlObj.childNodes(0).childNodes(i).firstChild.text +"</option>");
}
output.innerHTML += "</select>";
I just added the value to the <option> tag and I haven’t tested that yet but prior to adding a value to the options, all it did was give me a empty drop-down menu and list the 3 items from XML to the side of the menu. I’m almost positive the error is in my string formatting, its been a while since I’ve used javascript.
Appreciate all help, thanks.