[Javascript] form confirmation

Peter-Paul Koch gassinaumasis at hotmail.com
Sun May 27 15:04:52 CDT 2001



>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.





More information about the Javascript mailing list