Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] form confirmation


  • From: javascript@xxxxxxxxxx (Peter-Paul Koch)
  • Subject: [Javascript] form confirmation
  • Date: Sun, 27 May 2001 20:04:52 -0000


>I have an ASP form when the submit button is pressed the users record is 
>deleted from the database. Works great but I want to put a javascript that 
>prompts the user to confirm before the deletion takes place. I tried an 
>onClick with the submit button that asks the user if they're sure but no 
>matter if they answer ok or cancel, the deletion occurs.

<FORM etc. onSubmit="return checkOnceMore()">
<INPUT etc.>
</FORM>

function checkOnceMore()
{
	return confirm('Are you sure you want to delete this record?'); // on one 
line!
}

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.