Discussion

Java script error on modal window launch

On launching a modal window from button click , we are getting the following Jscript error and on the launched window the screen refresh continues happening on top of the modal window. Could someone please help us in resolving this issue

 

 

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; MS-RTC LM 8)
Timestamp: Tue, 25 Jun 2013 07:26:25 UTC

Message: Invalid argument.
Line: 1
Char: 46758
Code: 0
URI: http://10.81.145.201:8080/prweb/PRServlet/vNzKbx67USRv7pLgTilDqDg2MJH0YId9*/pega_ui_harness_deferred_13976864103!!.js

 

Thanks ,

 

Rajashree

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

June 26, 2013 - 6:49am

I am in a position to provide the answer here after debugging. Whenever a new modaldialog is launched, the static bundle content pega_ui_harness_deferred is called which in turn calls the pega_ui_modaldialog js.

 

Here under bug fix of BUG-75718

 

 if( (modalDialogBodySH + headerHeight + pega.u.d.MODALDIALOG_BUTTONS_HEIGHT + footerHeight + modalContainerTop ) > contentHieght && !actionIframeSec)

{   
  modalDialogBody.style.height = contentHieght - headerHeight - pega.u.d.MODALDIALOG_BUTTONS_HEIGHT - modalContainerTop + 'px';

//This is evaluating to negative due to a bigger modalContainer.offsetTop value which is causing the issue. 
 

This can be fixed by manually setting the value of modalContainerTop .

August 5, 2013 - 12:05pm

Thanks Rajashree for the info

November 22, 2013 - 10:40am

We are also facing Java script error on modal window launch after the application is migrated to 6.3 from 5.5. We are getting the same error even after manually setting the value of modalContainerTop.

Can you please let me know what value did you set for modalContainerTop?

 

November 25, 2013 - 12:46am

Yes, you can try this:

 

modalContainerTop = modalContainer ? (modalContainer.offsetTop/4) : 0;

instead of

modalContainerTop = modalContainer ? modalContainer.offsetTop : 0;

 

 Worked for me. Best of luck :)

November 25, 2013 - 4:46am

Hi Rajashree ,

 

Please raise a pega SR  regarding this.

February 17, 2014 - 2:54pm

I am having an issue with the height of the modal growing each time a check box is selected that resides in a repeating grid.  Extra white space keeps getting added to the bottom of the screen.  I tried to change modalContainerTop = modalContainer ? (modalContainer.offsetTop/4) : 0; but this didn't work.  I also tried to play around with taking off auto height but still can't get the "growing" to go away.  Any other idea's or work around fixes ?  I am using 6.3

December 10, 2015 - 4:38am
Response to EBAUGHAO

Looks its an existing bug in the system and we have a hotfix.

 

Open pega_ui_modaldialog.js and try the following and check if this resolves the issue:

Do private edit of this rule and inside this setModalDialogHeight fucntion, replace the following

 

if(pega.u.d.modalDialog.cfg.getProperty("fixedcenter") === false){

var modalContainer = this.modalDialog ? this.modalDialog.element : null;

modalContainerTop = modalContainer ? modalContainer.offsetTop : 0;

}

with

 

if(pega.u.d.modalDialog.cfg.getProperty("fixedcenter") === false && !isPortal){

var modalContainer = this.modalDialog ? this.modalDialog.element : null;

modalContainerTop = modalContainer ? modalContainer.offsetTop : 0;

}

Then save and relaunch your portal by deleting browser cache and test the usecase.

For more details, refer to the below link in pega mesh:--

https://mesh.pega.com/thread/53029

Pega has got a HFIX so you might want to raise an SR on this

August 26, 2015 - 10:08am

I also tried to change modalContainerTop = modalContainer ? (modalContainer.offsetTop/4) : 0; but this didn't work for me. I am using 6.3