Support Article
JavaScript Depending on Parent.Name Value Not Working
SA-5704
Summary
Developers notice that javascript nested in a html block no longer works in Pega 7.1.6. It used to work from PRPC 6.3 SP1. The javascript in question references the Parent.name property and it appears to be blank in the updated context.
Error Messages
N/A
Steps to Reproduce
- Create a HTML Rule which contains conditions that occur only when parent.window equals a certain value
- Configure a portal menu control to call OpenUrlInWindow for the html rule described above
- Test the scenario and confirm the conditions which depend on the parent window being a certain value are not executed
Root Cause
The root cause of this problem is a defect in customer application code/rules. The menu navigation rule needs have a value for a window name specified. The javascript must also take into account that this name is just appended to the requestor and as such can't be a simple equality statement.
Resolution
This issue is resolved through the following local change:
- Update menu navigation rule to include the window name
- Open Navigation Rule
- Select OpenURLInWindow Menu Item
- Click Actions Tab
- Update Window Name
- Update the javascript to search if the window name contains the string of interest
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.