Hi,
I’m a total newbie who is frustated with frames.
I want to link from one frame to another and send variables (php) along. The trouble is that the target frame is not always active meaning the frameset in which the target frame is in has to be loaded first.
So I got this tiny JavaScript that loads the desired frameset. I put an if statement in it so that the frameset is only loaded when needed.
[code=php]function change2frame(url)
{
if(window.top.main.location.href!=url)
{
window.top.main.location.href=url;
}
}
This does not work. The if statement is being ignored. I also tried if(!(window.top.main.location.href==url)). Same result.
I wouldn’t need this if all browsers would behave the same. The easiest thing would be to leave the “if” out and just have the window.top.main.location.href=url;. Put that in a “onClick” along with the link and it works. Only with Mozilla though. When using onFocus instead, it works on Opera, too. Still M$ Exploder and Safari evaluate the link first and then do the onFocus/onClick.
Please help.