[prev in list] [next in list] [prev in thread] [next in thread]
List: php-db
Subject: [PHP-DB] Subject: Re: Javascript forms [2]
From: "Neil Smith [MVP, Digital media]" <php () comatose ! freeserve ! co ! uk>
Date: 2004-06-29 10:31:59
Message-ID: 5.2.0.9.0.20040629112819.00a8f158 () pop ! freeserve ! net
[Download RAW message or body]
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
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic