Re: can't update action in display option (697 Views)
Reply
Valued Contributor
lss123
Posts: 88
Registered: ‎06-29-2011
Message 1 of 2 (703 Views)
Accepted Solution

can't update action in display option

I'm using the pre-RAD javascript panel to update the action for the display option.  My simple test is:

 

system.vars.$L_action="do nothing"

 

However, the system continues to proceed to the action defined in the displayoption, instead of doing nothing.  I've checked with print statements that this code is executing, and I've also checked that I've updated the variable properly.  I've also tried setting system.vars.$L_ds_action, as well as just vars.$L_action.  No succes.  Am I missing something?

 

All I really want to do in this javascript section is test for a condition, then stop execution and just return to the ticket if the condition is met.  I thought changing the action was the way to do this, but if there is another way, I'm all ears.  Thanks.

Honored Contributor
-m-
Posts: 989
Registered: ‎02-22-2011
Message 2 of 2 (697 Views)

Re: can't update action in display option

Solution:

The JavaScript to manipulate the $L.ds.action variable needs to be placed in the Post JavaScript tab (or use RAD syntax in the Post Rad Expressions tab).

 

Background:

The display RAD Application is responsible for building many variables (like $L.action and $L.ds.action) and passing some of them to the Document Engine. The $L.ds.action variable is not built until after it executes the RAD Application tab.

 

RAD: display

Panel: process.option ---> Evaluate Pre Rad Expression and Pre JavsScript tabs

Panel: check.rad ---> Execute the RAD Application (if it is populated)

Panel: get.action ---> $L.ds.action is set to NULL then evaluate Post Rad Expressions and Post Javascript

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.