Topic awaiting preservation: Help on validating the confirm() function in Javascript (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: |
posted 08-12-2004 10:11
I am trying to validate the confirm() funtion to return true in OK button is clicked in to return false if CANCEL button is clicked. i do not know how to refer to the OK or CANCEL button... Here code: function comfirmDel(userForm){
|
Lunatic (VI) Mad Scientist From: Massachusetts, USA |
posted 08-12-2004 10:20 |
Nervous Wreck (II) Inmate From: |
posted 08-12-2004 10:34
i tried doing some thing like.... code: <FORM name=update action='servlet/dmsDelUser' method=post onsubmit="Javascript:confirm('Are you sure you want to Delete this Object?\nNote: This operation is not reversible.\nSelect Cancel if you do not want to Perform this Operation.')">
|
Nervous Wreck (II) Inmate From: London |
posted 08-12-2004 13:33
Change yor onsubmit to this: code: onsubmit="return(confirm('Are you sure you want to Delete this Object?\nNote: This operation is not reversible.\nSelect Cancel if you do not want to Perform this Operation.'));">
|
Nervous Wreck (II) Inmate From: |
posted 08-14-2004 14:01
Thanks man. It works.. |