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!

Display an Alert message from PL/SQL block in APEX

762201Apr 22 2010 — edited May 4 2010
Hi,
we are getting an oracle exception while inserting a new row. As it is having the unique constaint on a coulumn.
Now the problem iis we need to Display an "Alert message" based on the input field validation. That java script code for alert has to be embeded nside a PL/SQL block in Oracle APEX Application.
we tried doing this with below code:

Begin
INSERT INTO <<table name>>(ID,NAME) VALUES (s1,:TXT_s2);
exception when others then
htp.p('<script language="javascript">');
htp.p('alert("Exception");');
htp.p('</script>');
end;

If anybody knows .... please reply.

Thanks,
Subarna
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2010
Added on Apr 22 2010
6 comments
27,200 views