Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

javascript in create button

srikaviMay 24 2008 — edited May 24 2008
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 21 2008
Added on May 24 2008
2 comments
545 views