![]() Topic awaiting preservation: Help on validating the confirm() function in Javascript (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: |
![]() 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 |
![]() |
Nervous Wreck (II) Inmate From: |
![]() 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 |
![]() 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: |
![]() Thanks man. It works.. |