I have a web page which has javascript which uses the innerHTML property of a <TD> object to replace that table cell's contents. The contents are of the form
[code=html]<span><select>< option1.../><option2..>... </select></span> [/code](in engish, the <td> contains a <span> which contains a <select> which contains some number of <option>s.
It works fine in IE. In Firefox it displays fine but when I submit the form the name and value for the select tag are missing from the request that is sent to the server. Another symptom is that in Firefox the DOM object for select is missing from document.forms[0].elements[] array
The reason I am using innerHTML rather than using the DOM methods to manipulate the options in the select is that the list of options is computed by a JSP tag on the server-side (and accessed via Ajax).
Does anyone know if there is a way get Firefox to create the <select> properly when it is created by setting the innerHTML on a <td>?
[code=html]<span><select>< option1.../><option2..>... </select></span> [/code](in engish, the <td> contains a <span> which contains a <select> which contains some number of <option>s.
It works fine in IE. In Firefox it displays fine but when I submit the form the name and value for the select tag are missing from the request that is sent to the server. Another symptom is that in Firefox the DOM object for select is missing from document.forms[0].elements[] array
The reason I am using innerHTML rather than using the DOM methods to manipulate the options in the select is that the list of options is computed by a JSP tag on the server-side (and accessed via Ajax).
Does anyone know if there is a way get Firefox to create the <select> properly when it is created by setting the innerHTML on a <td>?
Comment