javascript in create button
srikaviMay 24 2008 — edited May 24 2008Hi All,
I have a form,
2 buttons namely create and cancel,
1 ARP(DML) Process,
1 Manual Insert to another table
when i click the button "create" i have a javascript like this
function creating()
{ var a = document.getElementById('P7_SI_NO').value;
var b = document.getElementById('P7_SSINAME').value;
if (a == b)
{ doSubmit('CREATE');
}
else
{ alert('not a valid user');
doSubmit('CANCEL');}
}
now, when i click the "create" button the script is working fine.
(In above Js, when the condition is not met, it goes to the else part and give the alert message and not inserting the record.)
but, after the alert message, it is getting submitted and gives the "process success message" of the ARP(DML) process.
I dont want it to happen. instead it has to cancel and go the directed page.
Please, could anyone help me to solve this situation?
bye
Srikavi