Be aware of incorrect formatted HTML!

Yesterday i was checking a script that was using AJAX to load some form fields into the form based on the selection in a drop down. Everything there was working fine except the fact that when submitting the form, all AJAX loaded fields was missing in the FORM structure. And this was happening in FireFox while working fine in Internet Explorer.
To be short i will get right to the solution.
The problem was that the FORM tag was right after the TABLE tag (read FORM inside TABLE). Right after i changed the order, all worked fine.