Firefox stripping form tag in innerHTML
Hi,
I am generating a string from AJAX data which contains forms and submit buttons. I then try to assign this string to a div using innerHTML. This works fine in IE but Firefox strips form tags and every thing in between form tags. How to solve this issue
Example code:
str = "<form action='somepage.php' methid=post><input type=text name=some_field><input type=submit value='Submit'></form>";
document.getElementById('some_div').innerHTML=str;
I am using Firefox version 3.6.16
Thanks
dasatti
Junior Poster in Training
57 posts since Dec 2008
Reputation Points: 10
Solved Threads: 5
Dasatti,
You could try hard-coding the then deliver/insert just its contents.
If that doesn't work then hard code the whole form and show/hide it and change its properties/contents with DOM methods as necessary.
Airshow
Airshow
WiFi Lounge Lizard
2,683 posts since Apr 2009
Reputation Points: 321
Solved Threads: 372