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!

Use Dynamic Actions with pl/sql calling a javascript alert function

637224Sep 29 2010 — edited Feb 15 2012
Hi,

I'm using Apex 4.0.1.00.03 with IE7.

The problem I have is:

I'm converting a Oracle Forms application which has a lot of business logic in it. In the forms app it's doing a pl/sql function, which based on a If/else condition calls an alert popup box, which displays an alert message. It calls pl/sql functions, which return vlaues to the IF statement.

Example pl/sql code:

If check_records() > 0 Then
alert box message
ElsIf TypeA_record Then
alert box message
Else
alert box message
End If;

I need to replicate this functionality in Apex 4. I've attempted to create a Dynamic Action on a page item, using a pl/sql function, however, when I call javascript popup code, it does not popup an alert box. I need the pl/sql to run when the page item changes, not when the page is submitted.

The code I've used for testing the pl/sql code, which doesn't work in Dynamic Actions>pl/sql is:

Begin
HTP.p ('<script type="text/javascript">');
HTP.p ('alert(''Today is executing javascript code!'');'
);
HTP.p ('</script>');
End;

I need to create a pl/sql function that can do alert boxes based on an IF condition.

Could someone point me in the right direction? Is using Dynamic Actions the best way forward? I need to trigger on a page item changing value.
This post has been answered by sddc on Sep 29 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 14 2012
Added on Sep 29 2010
11 comments
6,061 views