Subject: Re: Javascript forms [2]

From: Date: Tue, 29 Jun 2004 10:31:59 +0000
Subject: Subject: Re: Javascript forms [2]
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-35033@lists.php.net to get a copy of this message
At 22:20 28/06/2004 +0000, you wrote:
From: "Vincent Jordan" <vjordan@extendedpop.com> To: <php-db@lists.php.net> Date: Sun, 27 Jun 2004 20:35:52 -0400 MIME-Version: 1.0 Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: 7bit Subject: Re: Php form & row delete problems I have tried this but somehow can not seem to get it working. I have incuded copy of the pages. thanks in advance for the assistance.
As usual you didn't say what's not working. Separately there's a bug in your javascript, this line : <a href="DelUser.php" onClick="if (confirm('Warranty Database:\nAre you sure you like to delete the selected users\(s\)\?'));"> Will always return true in javascript - that is, the default action of a link is to return true, and the link is followed. So you will *always* delete the user even if they say no. You need to write "return confirm()" instead of "if (confirm())" <a href="DelUser.php" onClick="return (confirm('Warranty Database:\nAre you sure you like to delete the selected users\(s\)\?'));"> Cheers - Neil

« previous php.db (#35033) next »