RE: [PHP] calling alerts from within PHP scripts...

From: Date: Fri, 20 Oct 2000 18:24:04 +0000
Subject: RE: [PHP] calling alerts from within PHP scripts...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21451@lists.php.net to get a copy of this message
You can do one of two things... A) make a pre-delete function from your php script so when the person clicks on delete it will say are you sure (no javascript at all) or B) .. <script language="JavaScript"> <!-- function evaluate() { if (confirm ("Sure you want to delete this one??")) { alert("Alright! It's gone!"); document.location = "delete.php?record_id=$record_id" } else { alert("You're lucky...I almost deleted it!") } } // --> </script> <a href="javascript:evaluate();">Delete This Record</a> ________________________________________ Justin Rodino <justin@goldendome.com> Web Application Developer Golden Dome Media PO Box 1616 Notre Dame, IN 46634 219.631.1116 800.728.7979 ext. 1116 219.631.1001 - fax http://www.goldendome.com/ http://www.wndu.com/ > -----Original Message----- > From: richard [mailto:rmccluskey@incubanks.com] > Sent: Friday, October 20, 2000 12:48 PM > To: PHP (E-mail) > Subject: [PHP] calling alerts from within PHP scripts... > > > hi there folks, hope someone can point me in a good direction :-) > > I have a link on a contact management web page (PHP back end) > for a "delete > record". This is on a page where the record is already on > display. The link > goes to the 'deleterecord.php' script, but I want a JS type > alert to pop up > saying are you sure (y/n) before the execution of the delete. > Is it possible > to fire this alert window, onTOP of the normal browser > window, and if yes > then go back to the script and do the delete, while if 'no' > then just close > alert and exit script (leaving me back at the record display > screen)... > > any help would be truly appreciated, > > richard > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.general (#21451) next »