|
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
OT: JavaScript - Return Confirm
I'm trying to use JavaScript to issue a popup confirm before it goes to a page. I'm using theRobert Orlini 06/22/04 10:22 A Robert Orlini wrote:Rick Root 06/22/04 01:15 P Thanks.Robert Orlini 06/22/04 01:50 P
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. ô¿ô
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>
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> _____
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||