Re: [PHP] Confirmation Requester
I Just wrote a page that does basic file management. For the Delete part I used script LANGUAGE=JavaScript function confirmSubmit() { var agree=confirm(Deleted Files Cannot Be Recovered. Are You Sure?); if (agree) return true ; else return false ; } /script In my Head and Input Type=submit name=submit Value=Delete onClick=return confirmSubmit() In my form. I think that should do what you want. Sheridan -Original Message- From: Dave Freeman [mailto:[EMAIL PROTECTED]] Sent: Friday, July 13, 2001 5:23 PM To: [EMAIL PROTECTED] Subject: [PHP] Confirmation Requester Hi All I'm really not sure if this is php or, perhaps, javascript. I have a php application in development. On one page I have a list of information extracted from a mysql database. I have links beside each line to edit or delete that informaiton (which calls a php function to carry out the actual work). I am trying to find a way to generate some sort of warning/confirmation on the delete link. ie. I want to give people a warning before they delete information out of the database. I know I can do this by using loading a form on the page and getting confirmation from it but I'm hoping to find a more elegant solution. What I'd really like to do is get a windows-style requester appearing with a warning and 'OK'/'Cancel' boxes. If they select OK then I'll go ahead and delete the data - if they select cancel I'll do nothing more. Mostly what I'm trying to do is have that ok/cancel take place before I do anything with the page currently being displayed. Can anyone offer pointers to a method of achieving this? CYA, Dave --- Outback Queensland Internet - Longreach, Outback Queensland - Australia http://www.outbackqld.net.au mailto:[EMAIL PROTECTED] --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Confirmation Requester
I'm not sure if this solution is not what you want to do or not... but what I've done is to essentially send information identifying the info to be deleted to another page (which you could pop up using jscript or target=_blank), which has yes or no buttons. If you click the yes button, it does its thing, then goes back to the original page. If you click no, it just goes back. I can send you the code if this fits, and sorry if it doesn't = Good luck, Ben -Original Message- From: Dave Freeman [mailto:[EMAIL PROTECTED]] Sent: Friday, July 13, 2001 5:23 PM To: [EMAIL PROTECTED] Subject: [PHP] Confirmation Requester Hi All I'm really not sure if this is php or, perhaps, javascript. I have a php application in development. On one page I have a list of information extracted from a mysql database. I have links beside each line to edit or delete that informaiton (which calls a php function to carry out the actual work). I am trying to find a way to generate some sort of warning/confirmation on the delete link. ie. I want to give people a warning before they delete information out of the database. I know I can do this by using loading a form on the page and getting confirmation from it but I'm hoping to find a more elegant solution. What I'd really like to do is get a windows-style requester appearing with a warning and 'OK'/'Cancel' boxes. If they select OK then I'll go ahead and delete the data - if they select cancel I'll do nothing more. Mostly what I'm trying to do is have that ok/cancel take place before I do anything with the page currently being displayed. Can anyone offer pointers to a method of achieving this? CYA, Dave --- Outback Queensland Internet - Longreach, Outback Queensland - Australia http://www.outbackqld.net.au mailto:[EMAIL PROTECTED] --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Confirmation Requester
Hi All I'm really not sure if this is php or, perhaps, javascript. I have a php application in development. On one page I have a list of information extracted from a mysql database. I have links beside each line to edit or delete that informaiton (which calls a php function to carry out the actual work). I am trying to find a way to generate some sort of warning/confirmation on the delete link. ie. I want to give people a warning before they delete information out of the database. I know I can do this by using loading a form on the page and getting confirmation from it but I'm hoping to find a more elegant solution. What I'd really like to do is get a windows-style requester appearing with a warning and 'OK'/'Cancel' boxes. If they select OK then I'll go ahead and delete the data - if they select cancel I'll do nothing more. Mostly what I'm trying to do is have that ok/cancel take place before I do anything with the page currently being displayed. Can anyone offer pointers to a method of achieving this? CYA, Dave --- Outback Queensland Internet - Longreach, Outback Queensland - Australia http://www.outbackqld.net.au mailto:[EMAIL PROTECTED] --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]