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
carbonfivecarbonfive 

Javascript error with embedded Web Integration Link

I have a web integration link that embeds our web site within the SF navigation.

In IE6 I get a javascript error from the embedding SF page when a new page loads.

The error is "Invalid argument on line 263" which is the line:

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

in the JavaScript block:

function doResize(){

    var ifr = document.getElementById("itarget");

    var newHeight = 600;

    if (ifr && ifr.document && ifr.document.body) {

        if (ifr.document.body.scrollHeight){
            newHeight = Math.max(newHeight, ifr.document.body.scrollHeight);
        }
        if (ifr.document.body.clientHeight){
            newHeight = Math.max(newHeight, ifr.document.body.clientHeight);
        }
        if (ifr.document.body.offsetHeight){
            newHeight = Math.max(newHeight, ifr.document.body.offsetHeight);
        }
        if (ifr.document.body.height){
            newHeight = Math.max(newHeight, ifr.document.body.height);
        }
    }

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

}

Looking for this same error in FireBird (where I would get a better error message) I do not get the error at all.

Any thoughts?

Alon / Carbonfive

Message Edited by carbonfive on 04-23-2004 10:57 AM

adamgadamg
I might totally off base here, but is it a security issue? (I assume you are attempting to resize the frame from a domain different than the frame "owner") - that might also explain why it works on Firebird.
jeselonjeselon

We encoutered the same error under the same situation: WIL embedded in SF

problem line:

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

We believe the problem is the values of ifr.style.height has "px" at the end of it, i.e. 672px, which is causing the 'invalid argument' error.

This seems to be Javascript of SalesForce's end, so we hope someone could take a look at it and make the necessary corrections.

Thank you.

 

DevAngelDevAngel

Hi jeselon,

We are aware of this issue and are correcting the problem.  Thank you for the feedback and detective work.