| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|Disable form unless scripting on|
So here is my [no brainer] question ...
If I disable the submit button thus:
<form name="BookingForm" action="/cgi-bin/formmail.cgi" method="POST" onSubmit="return CheckInput(this)">
<input type="submit" disabled name="Submit" value="Submit">
Can I then do something like this:
<!-- Submit.disabled = true; -->
<noscript>You must have scripting on to use this form.</noscript>
to enable the submit button if scripting is on?
Remove the form's onsubmit handler,
and replace the the submit button with a normal button:
<input type="button" value="submit" onclick="if(checkInput(this.form))this.form.submit()">
You could alternatively set the submit button's disabled attribute, then set it to false when the page loads - I haven't tested that one.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved