Omar Abdel-Wahab

DOM

Browsers and dynamically-generated form fields

A month ago, I was working on some AJAX stuff on vTiger. I was generating some form elements with JavaScript with appendChild() function. The elements appeared fine but when testing the form with some data and submitting, the generated form fields passed on data on neither POST nor GET.
The problem was with Firefox, Opera and Konquerer but not on Internet Explorer!!
After doing some checks and re-building the whole thing I found out it's a problem with nesting page elements, for example when you put start a FORM tag inside a DIV then you close the DIV then finally close the tag.