[thelist] onclick="this.submit.button.is.disabled.and.greyed. out" ?
Plunkett, Matt
MPlunkett at MSA.com
Mon Sep 23 09:57:07 CDT 2002
You could define a top level JavaScript variable and check whether it is
true or false in a handler for your onclick. Just set bBusy to true when
your page is busy. I don't think you can "grey out" a normal button, but
you could easily make a button-like div whose style you changed when bBusy
was true...then you could just remove the else below.
<input type="button" OnClick="do_submit()">
<script>
var bBusy = false;
function do_submit()
{
if (!bBusy) { yourform.submit(); }
else { alert("Wait a durn second there."); }
}
</script>
-----Original Message-----
From: Dunstan Orchard [mailto:dunstan at 1976design.com]
Sent: Monday, September 23, 2002 10:48 AM
To: evolt list
Subject: [thelist]
onclick="this.submit.button.is.disabled.and.greyed.out" ?
Hey there,
I have a form where people can upload images.
Some of the images are quite big and take about 30 seconds to upload (mind
you, that's probably cause I'm connecting at a blistering 44k).
I am worried that someone will click 'submit' a second, third or fourth time
during this upload time, thinking that the process isn't working (as my
parents are want to do - "STOP CLICKING MUM, IT'S WORKING!"), thus
submitting
multiple copies of the form, or screwing things up generally.
Is there a bit of JS that will say
onclick="this.submit.button.is.disabled.and.greyed.out" ?
Once the images have uploaded the page reloads so I guess the button would
return to normal again.
Thanks very much - dunstan
---------------------------
Dorset, England
http://www.1976design.com/
http://www.orchard.it/
http://www.maccaws.org/
--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !
More information about the thelist
mailing list