Support Article
Invalid argument Javascript error
SA-7738
Summary
When you hit the final "submit" on Wrapup, you receive notice of a Javascript error and Wrapup fails to complete. The error window shows that the problem is occurring in pega_cpm_tabbednavigation.
Error Messages
You see an error popup with this message:
"Errors on this webpage might cause it to work incorrectly".
Additional detail in the error popup shows "Invalid Argument" as the particular Javascript error.
Steps to Reproduce
1. Any command that adds or deletes any CPM tab
2. Any command or mouse action that resizes the IE window
Root Cause
The root cause of this problem is a defect in Pegasystems’ code/rules. It depends upon the presence of two factors:
1. The Interaction Driver has enough items in it so that the bottom of the driver panel extends below the bottom of the visible viewport. The "extension of the Driver" refers to the imaginary panel that would be drawn if you extended it past the point at which it actually gets clipped; this extension is what would be needed to list all of the items in the Interaction Driver if it were not getting clipped.
2. You have many lines of dialog on the screen.
This combination exploits a bug in _resizeMainTabArea so that the system tries to set an element.style.height to a negative number. IE will not allow this, with the resulting "invalid argument" JS error.
Resolution
If you suspect you have this problem, you can confirm by reducing the IE zoom factor to something very small (50%) so that everything fits on the screen without clipping. If you do this and the problem will not repeat, then you are experiencing this particular error.
You can eliminate the problem by adding scrollbars to the Dialog section so that its actual vertical size is less than some critical number. There are two sections that are used to display the dialog which need to get changed.
1. Create a custom version of PegaCA-Work!KTDialog.
You want to change this:
<span id="dialogText" class="dialogText">
to this
<span id="dialogText" class="dialogText" style="height:150px; overflow-y:auto">
The use of 150px is just an example. You should choose your pixel size so that it presents a reasonable amount of text, yet keeps the vertical dimension of the dialog small enough so that the JS error does not occur.
2. Create a custom version of PegaCA-Work !CPMKTDialogContents
You need to change this:
<div id="dialogTextTD" here="stuff">
to this:
<div id="dialogTextTD" here="stuff" style="height:150px; overflow-y:auto">
Again, the use of "150px" is just used as an example.
Published January 31, 2016 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.