function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jeselonjeselon 

Javascript Error

We have encountered the same javascript error.  We think we have determined the problem and have a potental fix.  We have to sample attachments.  Is it possible to send to you.

Pre-condition:

We have created a Web Integration Link under the Contacts tab, which opens in the salesforce.com window (in frame).

 

Steps to reproduce:

  1. Click on the Web Integration Link to go to the specified site.
  2. Click on a link on the site to go to a different page on that site.

 

Expected Results:

After this second page completes loading, the javascript error occurs.  This can be identified with the Error icon on the bottom left of the Internet Explorer window.

 

 

Findings:

This error occurs on every page that is visited on that linked site, except the first page that the Web Integration Link points to.  This happens on both salesforce inframe window open options (with sidebar and without sidebar).

 

We discovered that the following line of code in the doResize() function was causing the error:

 

                ifr.style.height = Math.max(ifr.style.height, newHeight);

 

We created the attached html pages using the same javascript code and iframe setup found on the salesforce page.  The iframe points to www.dell.com.

 

The error occurs due to the following:

The value of ifr.style.height contains the characters â¬?pxâ¬? at the end, for example, 672px.  This was being compared to the value of newHeight, which didnâ¬?t have the â¬?pxâ¬? at the end.  The â¬?pxâ¬? was possibly causing the â¬?invalid argumentâ¬? error.

 

In the attached html file suffixed with â¬?modifiedâ¬?, we replicated the iframe setup and doResize() function used the SalesForce website.  Changes were made to the doResize() function such that the â¬?pxâ¬? is removed before it is passed into the doResize() function.  With this change, the error no longer occurs.  The html document suffixed with â¬?errorâ¬? is a copy of the existing SalesForce code â¬? and still causes the error.

 

There is debugging code in the html files that displays the values of ifr.style.height and newHeight each page loads.

 

 

 

adamgadamg
Thanks for taking the time to create a full report of the problem - its very useful for us!

This has been identified as a bug, and development is now working on this fix. We'll keep you posted - hopefully it will be soon.