House of Fusion
Home of the ColdFusion Community
Hostmysite Dedicated Hosting

Search cf-talk

August 21, 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             

Subscribe Now
Fusion Authority Quarterly Update - ColdFusion 8 Special Edition

For ColdFusion hosting try HostMySite.com.
Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

JavaScript - Return Confirm

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
I would wrap it all inside the JS:
Adkins, Randy
06/22/04 01:46 P

06/22/2004 10:29 AM
Author:
Pascal Peters

You are mixing server side and client side here. You need to put the JS in the onsubmit of the form (and not in your action page): <form ... onsubmit="return confirm('Are you sure you want to RELEASE this PO?');">

06/22/2004 01:46 PM
Author:
Adkins, Randy

I would wrap it all inside the JS: (something along these lines): <CFIF IsDefined("form.add.x")> <Script Language = "Javascript"> return confirm('Are you sure you want to RELEASE this PO?'); if (confirm == true){ window.location='purchaseorder_page_6_release.cfm'; } </script> </CFIF> 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. ô¿ô   _____  


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

Mailing Lists