Re: Confirmation Requester

From: Date: Fri, 20 Jul 2001 14:43:13 +0000
Subject: Re: Confirmation Requester
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58910@lists.php.net to get a copy of this message
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:dfreeman@outbackqld.net.au] > Sent: Friday, July 13, 2001 5:23 PM > To: php-general@lists.php.net > 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:dfreeman@outbackqld.net.au > ----------------------------------------------------------------------- > > -- > 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 (#58910) next »