[Javascript] Show/Hide advanced form and submitting

Roland Neilands rneilands at pulsemining.com.au
Mon Feb 5 19:09:40 CST 2007


Bill,

This sounds like what you're after:
http://www.quirksmode.org/dom/usableforms.html
http://www.quirksmode.org/dom/domform.html

Regards,
Roland 



Bill Moseley wrote:
> I have a simple task to show/hide an advanced search form.
> With javascript turned off the full (advanced) form shows, which is
> fine.
>
> With javascript enabled, the advanced part of the form is hidden, and
> <span> nodes are are created to show/hide the form.
>
> Now, even with the form hidden (.style.display = 'none') the hidden
> fields are submitted.  Are there any simple tricks to only submit the
> fields that are not hidden?
>
> I'm currently using a hidden field that I also toggle that will tell
> my program if the advanced form was displayed or not.  But, it would
> be nice if the request didn't include all the form parameters when
> just using the simple form.
>
>
> I suppose the other option is to have two separate forms, but that
> looks odd when javascript is disabled.
>
>
>
>
>
>   



More information about the Javascript mailing list