This would be a nice custom tag as well.

<!---
        submit button
--->
<cfparam name="attributes.name">
<cfparam name="attributes.value" default="#attributes.name#">
<cfparam name="attributes.submitvalue" default="Submitting...">

<cfoutput>
<input type="submit" name="#attributes.name#" value="#attributes.value#"
       onClick="if(this.value == '#JSEncodedFormat(attributes.value)#')
this.form.submit();
 this.value = '#JSEncodedFormat(attributes.submitvalue)#';"
>
</cfoutput>

I didn't actually test this though. ;)

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email    : [EMAIL PROTECTED]
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: Angel Stewart [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, April 16, 2002 11:38 AM
> To: CF-Community
> Subject: RE: Code to prevent double submits
> 
> 
> *reads it over*
> 
> *pushes glasses up on nose slightly*
> 
> Yes..yes..yeeeeess.
> This seems as though it will work juuuuust fine.
> *rubs hands together*
> *glances at Larry* 
> 
> Thankies :)
> 
> *drops code into CFSTUDIO snippet*
> -Gel
> 
> 
> -----Original Message-----
> From: Larry Lyons [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, April 16, 2002 11:31 AM
> To: CF-Community
> Subject: RE: Code to prevent double submits
> 
> 
> Here're you go 'gel:
> 
> <INPUT TYPE="Button" 
>        VALUE="Change Quantities" 
> onClick="if(this.value == 'Change Quantities') this.form.submit();
> this.value = 'Please Wait.';">
> 
> 
> Then if the user tries clicking again on the button nothing 
> happens, it
> only submits if the value of the button is Change Quantities.
> 
> hth,
> 
> larry
> 
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to