Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frame window.location behavior in netscape 7

Status
Not open for further replies.

joshualtools

Programmer
Jul 30, 2001
6
0
0
US
Is there something I should know about setting a location of a frame window in Netscape 7?

What I am doing is using a javascript function to do two simple things: "pop-up" a hidden frame and then change the location of that frame to a parameter I pass into the function.

What happens is that when I first call the function below, the &quot;pop-up frame&quot; appears, but the location of that frame is unchanged, it remains set to whatever I seeded it with in the <FRAMESET>. However, after that initial call, all is well and calling that same function loads the proper location in the frameset.

The function looks like this:
//Popup-Frame Function
function popFrameWindow(URL){
if (NS4) {
popNewWindow(URL); // Netscape 4 doesn't allow body.rows to be set, this function is a simple window.open
} else {
window.parent.parent.frames[1].location = URL;
window.parent.parent.document.body.rows = '*,*';
}
}

I've tried location.replace(URL) and I've tried adding location.reload() as well.

Any thoughts? It's frustrating especially since it's only netscape 7 where this occurs, before I added the condition for Netscape 4, there was no problem with that .location assignment.

Thanks in advance.
 
how about this instead?

window.top.frames[1].location = URL;
window.top.document.body.rows = '*,*';


=========================================================
while (!succeed) try();
-jeff
 
I'm buried in frames, can't assume that my page will be at the top, otherwise, that'd be a cleaner way to do it, yes. The interesting thing is that if I resize the &quot;pop-up&quot; frame and call that function again, the location will change, but the rows property will not, as it does in IE.

Looks like I need to look for a new solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top