House of Fusion
Home of the ColdFusion Community

Search cf-talk

December 02, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31       

Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

OT: JavaScript - Return Confirm

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Robert Orlini wrote:
Rick Root
06/22/04 01:15 P
Thanks.
Robert Orlini
06/22/04 01:50 P

06/22/2004 10:22 AM
Author:
Robert Orlini

I'm trying to use JavaScript to issue a popup confirm before it goes to a page. I'm using the "return confirm" function below which I used in a onSubmit. I'm kinda new to JS. Can I use the return confirm like an alert? It doesn't stop to confirm. Does someone have a better way? Thanks. <CFIF IsDefined("form.add.x")> <Script Language = "Javascript"> return confirm('Are you sure you want to RELEASE this PO?'); </script> <CFLocation URL="purchaseorder_page_6_release.cfm"> </CFIF> Roberto O. ô¿ô

06/22/2004 01:15 PM
Author:
Rick Root

Robert Orlini wrote: > I'm trying to use JavaScript to issue a popup confirm before it goes to > a page. I'm using the "return confirm" function below which I used in a > onSubmit. I'm kinda new to JS. Can I use the return confirm like an > alert? It doesn't stop to confirm. Not the way you're doing it... ick!  Why don't you use it in the onSubmit of the form? If you must do it AFTER the user submits, then you could try this: <CFIF IsDefined("form.add.x")> <Script Language = "Javascript"> if( confirm('Are you sure you want to RELEASE this PO?') ) {   window.location.href="purchaseorder_page_6_release.cfm"; } </script> </CFIF>     

06/22/2004 01:50 PM
Author:
Robert Orlini

Thanks. Robert Orlini wrote: > I'm trying to use JavaScript to issue a popup confirm before it goes to > a page. I'm using the "return confirm" function below which I used in a > onSubmit. I'm kinda new to JS. Can I use the return confirm like an > alert? It doesn't stop to confirm. Not the way you're doing it... ick!  Why don't you use it in the onSubmit of the form? If you must do it AFTER the user submits, then you could try this: <CFIF IsDefined("form.add.x")> <Script Language = "Javascript"> if( confirm('Are you sure you want to RELEASE this PO?') ) { window.location.href="purchaseorder_page_6_release.cfm"; } </script> </CFIF>   _____  


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists