[Javascript] Show/Hide advanced form and submitting
Bill Moseley
moseley at hank.org
Tue Feb 6 00:55:43 CST 2007
On Tue, Feb 06, 2007 at 12:09:40PM +1100, Roland Neilands wrote:
> Bill,
>
> This sounds like what you're after:
> http://www.quirksmode.org/dom/usableforms.html
Thanks!
I'm now moving my "advanced" form fields outside the <form> tag
as explained in the link above to hide them and prevent them from
being submitted.
I originally was going to use a combination of "disabled" and
"display: none" to prevent the hidden form fields from being
submitted. I suppose it's better to change the structure of the DOM
than to just disable the fields.
BTW -
I wanted to make it so if Javascript is disabled that the advanced
form would show. The problem with that is with Javascript *enabled*
the form first shows then vanishes when the onLoad event runs. Kind
of ugly.
So, I now have "display: none" on the advanced form to prevent it from
initially displaying, but that makes the form not display if
javascript is disabled.
--
Bill Moseley
moseley at hank.org
More information about the Javascript
mailing list