Click to See Complete Forum and Search --> : javascript cancel button


jlongo_08807
May 12th, 2003, 02:37 PM
hello all.

i want to show a ok/cancel javascript window on the onclick() event.

so that, if they choose OK, the script submits the form, if they choose CANCEL, the script jsut reshows the same form.

thanks in advance.

Joe.

Satishpp
May 12th, 2003, 05:03 PM
For example , onclick call the following function


function test()
{
if(confirm("Are you sure?"))
{
frmTest.submit();
}
else
{
//do something else
}
}


Confirm is an inbuilt Javascript function that provides this functionality

Satish