Problems with form elements that are hidden with <div style="display:none">
Dan R Brown (d…@TheWorld.com)
Thu, 31 Jul 2003
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to
break up this form into several "tabbed" sections, I break up the form using <div>
tags. Each <div style="display:none"> can be displayed by setting the style attribute
to "display:", or hidden with "display:none". This gives the illusion that the person
filling out the form is switching from page to page...without the overhead of extra
hits on the server, since the entire page is already loaded on the client. It also has
the added advantage of being able to switch from section to section without any data
event on the "tabs"), and this works fine.
Once the user finishes the form, the click submit and in theory the entire form is
submitted. The problem is when using NS6.x browsers ( a requirement for this project
), any form field that resides in a hidden div tag (<div style="display:none">) is
treated as if it does not exist. This is not a problem with IE6+ and NS7.x+.