PDA

View Full Version : parent.frames[1] and IE 5.0


Dr. Web
03-13-2002, 12:51 PM
heres the scene: frameset 3 frames.... top, left, right.

On click of the right frame I call a function in the left frame to pop up a now loading window "parent.frames[1].popWin()", and onload of the content piece I call a function to close the window if open "parent.frames[1].closeWin()".

All is fine in IE5.5 and IE6. However, in IE 5 I get object/ method not supported. Right now, I have put into place some server side code which simply does not write out the function calls if the browser is IE5.0, but I wouldn't mind figuring it out for them.

Also, I have noticed that only IE 5.0 holds onto the cache from a database driven page unless specifically instructed not to. Was this a feature..... or a bug?

Thanks!

steve_ghb
03-13-2002, 02:30 PM
This might sound stupid, but did you try 'window.parent.frames[1]'?

I've sometimes run into problems like this, where you have to explicitly indicate the current window, like 'window.alert(message)' instead of just 'alert(message)'.

Worth a shot.

Dr. Web
03-13-2002, 03:55 PM
Steve,

thanks for the response... and yes unfortunately I did try window.parent.frames[1]. As I mentioned its an IE5.0 only problem.... so I'm not too stressed by it.


That just means my IE5.0 users don't see the animated 'building report' message.

Jon Hanlon
03-13-2002, 05:09 PM
In general try to stay away from the "parent.frames[1].popWin()" syntax and use "parent.frames.frameName.popWin()" instead.
Frames can load in any order, and although frames[1] should be the second frame declared in the frameset - who knows?
Maybe try replacing it by:

if (parent.frames[1].popWin)
parent.frames[1].popWin()
else
window.status = "No popWin in " + parent.frames[1].name;