Hello,
I am trying to make a dynamic AJAX form in a webpage and I want to dynamically change a <select> box's options.
So I have a server-side PHP script which generates following response :
I want to insert options that lay within the <Result> tag directly into the webpage using document.getEle mentById("mySel ect").innerHTML .
The problem is that getElementsByTa gName('Result') .item(0).nodeVa lue returns an empty string.
Is there any way to convert the node to text or string ?
Rus.
I am trying to make a dynamic AJAX form in a webpage and I want to dynamically change a <select> box's options.
So I have a server-side PHP script which generates following response :
Code:
<?xml version="1.0" encoding="iso-8859-1"?> <WebResponse> <WebResponseInd id="0"> <Response> <Result> <option value="1">First option</option> <option value="2">Second option</option> </Result> </Response> </WebResponseInd> </WebResponse>
The problem is that getElementsByTa gName('Result') .item(0).nodeVa lue returns an empty string.
Is there any way to convert the node to text or string ?
Rus.
Comment