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!

How to Raise an Javascript error (via) DA

miniOct 12 2011 — edited Oct 12 2011
Hi friends,

i have two select list page item(in which both the items has a static lov's---> 'Y', 'N')

Suppose, if i select the combination like the below

P1_select--->N
P2_select--->N

Soon after that i need to raise an error like *'this combination cannot be allowed'*

For that i tried with the Dynamic Actions like the below

EVENT: CHANGE

SELECTION TYPE(S): ITEM

ITEM: P1_SELECT,P2_SELECT

Condition: No Condition

Action: Execute Javascript Code

Code:
sel1 = $v('P1_SELECT');
sel2 = $v('P2_SELECT');
if  (   (sel1 == 'N' ) &&  
        (sel2 == 'N')
     )
     {
       throw "Err1";
}
catch(er)
  {
  if(er=="Err1")
    {
    alert("Error! The Combination is not possible");
    }
But it is not working, as it is not raising any error soon after giving 'N' and 'N' in both the page items. Can anyone help me with this friends.

Brgds,
Mini
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 9 2011
Added on Oct 12 2011
6 comments
938 views