You can simply do this:
<form action="http://msn.com/"; onsubmit="var btn =
document.getElementById('btn'); btn.disabled=true; btn.value='Please
wait...'">
        <input type="submit" id="btn" value="test">
</form>

However, if you actually need the value of the submit button (e.g. if
you have several different buttons) then you need to be smarter. What
you can do is have two buttons for each: one real button and one hidden
and disabled. When the form submits, you hide the real buttons and show
the disabled ones. It looks like the real ones have become disabled, but
really you're just swapping which one is visible. Demo of this technique
here:
http://www.eswsoftware.com/products/terraform/docs/formats_and_datatypes
/Standard_formats/Submit.cfm? 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott
Thornton
Sent: Monday, 5 September 2005 5:00 p.m.
To: CFAussie Mailing List
Subject: [cfaussie] OT: Mulitple Submits

Hi,

I am looking for some code to take a humble submit button, and make it
multiple-submit proof. I have seen it around before, but can't recall
the solution.

Eg, After clicking, the button text changes to "Please wait", and
becomes disabled, and the form submits still.....

Cheers,

Scott Thornton, Programmer
Application Development
Information Services and Telecommunications
Hunter-New England Area Health Service
Phone  RNH +61 2 49236066
Fax       +61 2 49236076

[EMAIL PROTECTED]


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/




---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to