RE: Hiding and unhiding the submit button
by "Campbell, Rebecca" <Rebecca.Campbell(at)converg.com>
|
| Date: |
Mon, 5 Jun 2000 09:42:46 -0600 |
| To: |
"'Mike Taylor'" <lonewolf(at)one.net>, hwg-techniques(at)hwg.org |
| |
todo: View
Thread,
Original
|
|
yep, you can. i would probably also add the submit function to the
javascript, although if you have a lot of users who browse with javascript
turned off, you might not want to...
function hideSubmit() {
// need a browser sniffer for this one (not included here)
if(ie) {
document.all.yourDiv.style.visibility = 'hidden';
document.all.yourForm.submit();
}
if(nn) {
document.yourDiv.visibility = 'hide';
document.yourForm.submit();
}
if you add the submit to the function, you'll need to have your button just
be a button with an onclick (instead of having type="submit", have
type="Button")
e.g., <input type="Button" onClick="hideSubmit()" value="click me! click
me!!">
i haven't actually tested this all out, but it should be pretty close...
hth,
rebecca
http://www.nerdygirl.com
-----Original Message-----
From: Mike Taylor [mailto:lonewolf(at)one.net]
Sent: Monday, June 05, 2000 6:50 AM
To: hwg-techniques(at)hwg.org
Subject: Hiding and unhiding the submit button
Does anyone know if it's possible to use <DIV> tags and a little
JavaScript to hide and unhide a submit button when an OnClick event
occurs?
For example, I'm hoping to hide the submit button when a user clicks on
it, hopefully eliminating multiple submissions by over-anxious visitors.
Thanks.
Mike Taylor
lonewolf(at)one.net
http://w3.one.net/~lonewolf/
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.