August 21, 2008
For ColdFusion hosting try HostMySite.com. |
Home /
Groups /
ColdFusion Talk (CF-Talk)
JavaScript - Return Confirm
You are mixing server side and client side here. You need to put the JS in the onsubmit of the formPascal Peters 06/22/04 10:29 A I would wrap it all inside the JS:Adkins, Randy 06/22/04 01:46 P
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?');">
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. ô¿ô _____
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||