House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

JavaScript confirm delete

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

JavaScript confirm delete

<script language="JavaScript"> Adkins, Randy 06/14/2004 04:01 PM
Done. Thanks all. Robert Orlini 06/14/2004 03:53 PM
you could also do this on an anchor tag ... which comes in handy sometimes: Greg Landers 06/14/2004 03:51 PM
Why not just say Katz, Dov B (IT) 06/14/2004 03:37 PM
Robert: Mosh Teitelbaum 06/14/2004 03:34 PM

06/14/2004 04:01 PM
Author: Adkins, Randy Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33214#166576 <script language="JavaScript"> <!-- function confirmDelete(aURL) {     if(confirm('Are you sure you want to delete this BLAH BLAH BLAH?')) {       location.href = aURL;     }   } //--> </script> Anyone have or know where I can get some JavaScript code that uses a JavaScript confirm box to ask the user if they want to delete? Is there a CF way to do it? Thanks. Robert O. at HWW   _____  
06/14/2004 03:53 PM
Author: Robert Orlini Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33214#166573 Done. Thanks all. Robert O. Why not just say <Form blah action="xxxxxxx" onSubmit="return confirm('Are you sure you want to delete?');"> <etc> -Dov   _____ Sent: Monday, June 14, 2004 3:30 PM To: CF-Talk Subject: RE: JavaScript confirm delete Robert: Something like the following should do it for you.  The confirm() function in JavaScript creates a dialog box with "OK" and "Cancel" buttons. Pressing "OK" returns true, pressing "Cancel" returns false. <SCRIPT LANGUAGE="JavaScript"> <!-- function confirmDelete() { var msg = "Are you sure you want to delete?"; if ( confirm(msg) ) { document.formName.submit(); } } // --> </SCRIPT> <FORM NAME="formName" ACTION="delete.cfm" METHOD="Post"> <INPUT TYPE="Button" VALUE="Delete" onClick="confirmDelete();"> </FORM> Note, this was just whipped together and not tested.  Also, the above form is incomplete.  At the least, it should likely specify an ID of the object that is to be deleted, etc. ColdFusion can do this too but it requires an extra trip to the server, i.e., deleteForm.cfm -> deleteConfirm.cfm -> deleteAction.cfm -- Mosh Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: mosh.teitelbaum@evoch.com WWW: http://www.evoch.com/ Anyone have or know where I can get some JavaScript code that uses a JavaScript confirm box to ask the user if they want to delete? Is there a CF way to do it? Thanks. Robert O. at HWW   _____   _____  
06/14/2004 03:51 PM
Author: Greg Landers Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33214#166572 you could also do this on an anchor tag ... which comes in handy sometimes: <a href="delete.cfm" onClick=""return confirm('Delete?!?');">Delete</a> - Greg Katz, Dov B (IT) wrote: ----- Excess quoted text cut - see Original Post for more -----
06/14/2004 03:37 PM
Author: Katz, Dov B (IT) Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33214#166569 Why not just say <Form blah action="xxxxxxx" onSubmit="return confirm('Are you sure you want to delete?');"> <etc> -Dov   _____ Sent: Monday, June 14, 2004 3:30 PM To: CF-Talk Subject: RE: JavaScript confirm delete Robert: Something like the following should do it for you.  The confirm() function in JavaScript creates a dialog box with "OK" and "Cancel" buttons. Pressing "OK" returns true, pressing "Cancel" returns false. <SCRIPT LANGUAGE="JavaScript"> <!-- function confirmDelete() { var msg = "Are you sure you want to delete?"; if ( confirm(msg) ) { document.formName.submit(); } } // --> </SCRIPT> <FORM NAME="formName" ACTION="delete.cfm" METHOD="Post"> <INPUT TYPE="Button" VALUE="Delete" onClick="confirmDelete();"> </FORM> Note, this was just whipped together and not tested.  Also, the above form is incomplete.  At the least, it should likely specify an ID of the object that is to be deleted, etc. ColdFusion can do this too but it requires an extra trip to the server, i.e., deleteForm.cfm -> deleteConfirm.cfm -> deleteAction.cfm -- Mosh Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: mosh.teitelbaum@evoch.com WWW: http://www.evoch.com/ Anyone have or know where I can get some JavaScript code that uses a JavaScript confirm box to ask the user if they want to delete? Is there a CF way to do it? Thanks. Robert O. at HWW   _____  
06/14/2004 03:34 PM
Author: Mosh Teitelbaum Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:33214#166567 Robert: Something like the following should do it for you.  The confirm() function in JavaScript creates a dialog box with "OK" and "Cancel" buttons.  Pressing "OK" returns true, pressing "Cancel" returns false.   <SCRIPT LANGUAGE="JavaScript">   <!--     function confirmDelete() {       var msg = "Are you sure you want to delete?";       if ( confirm(msg) ) {         document.formName.submit();       }     }   // -->   </SCRIPT>   <FORM NAME="formName" ACTION="delete.cfm" METHOD="Post">     <INPUT TYPE="Button" VALUE="Delete" onClick="confirmDelete();">   </FORM> Note, this was just whipped together and not tested.  Also, the above form is incomplete.  At the least, it should likely specify an ID of the object that is to be deleted, etc. ColdFusion can do this too but it requires an extra trip to the server, i.e.,   deleteForm.cfm -> deleteConfirm.cfm -> deleteAction.cfm -- Mosh Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: mosh.teitelbaum@evoch.com WWW: http://www.evoch.com/ Anyone have or know where I can get some JavaScript code that uses a JavaScript confirm box to ask the user if they want to delete? Is there a CF way to do it? Thanks. Robert O. at HWW
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   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     

Designer, Developer and mobile workflow conference