works in firefox but not in IE ?

  • Thread starter Ron Croonenberg
  • Start date
R

Ron Croonenberg

hello,

The function below seems to work just fine in firefox but not in IE ?
what I am trying to accomplish is find the first frame that does have a
'page loaded". I noticed (but I am probably wrong) that if that's not
the case that location is "about:blank".

any ideas ?

thanks,

Ron



function findActiveFrame() {
var frameid = "";
var frameObj;
var i;

for (i=1; i<9; i++) {
frameid = "frame-" + i;
frameObj =
parent.document.getElementById(frameid).contentDocument.location;
if (frameObj.href != "about:blank")
return i;
}
return 0;
}
 
M

Martin Honnen

Ron said:
The function below seems to work just fine in firefox but not in IE ?
parent.document.getElementById(frameid).contentDocument.location;

contentDocument is not supported by IE. IE 5.5 and later however support
contentWindow.
 
R

Ron Croonenberg

Ah, ok.

is contentWindow supported in most browsers ?

Also, If I don't 'set' the src location in the frame when I created the
frame I noticed that the location basically is the same as the one from
the parent. Is there a way to set it to 'null' or empty or something ?
Or does a frame location always have to be a valid url and when left
'empty' it 'inherits' the src location of it's parent ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top