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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FireFox vs IE

Status
Not open for further replies.

ashim2

Programmer
Joined
May 19, 2006
Messages
4
Location
US
I wrote a JavaScript code,
but FireFox and IE have different results.

The code is:
alert (parent.frame2.location);
parent.frame2.location.href = "file2.htm";
alert (parent.frame2.location);

In FireFox the result is:
.../file0.htm
.../file0.htm

In IE the result is:
.../file0.htm
.../file2.htm

How can I make the result in FireFox to be the same as the result in IE?
Thank you.
 
It's probably a timing issue. Try putting a dummy alert before the second alert, and waiting a few seconds.

Incidentally, do thr frames switch src OK whrn you set location.href?

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
> It's probably a timing issue. Try putting a dummy alert before the second alert, and waiting a few seconds.

It does not work. I even added some statements and loops before the second alert.

I wonder if FireFox does not deal with the next frame until all the tasks in the first frame are done.


> Incidentally, do thr frames switch src OK whrn you set location.href?

Sorry I am not quite sure what you mean here.
Could you describe more?
 
> Does the page loaded in frame2 actually change?

FireFox does not show any change for file0.htm or file2.htm in Frame2 until the Javascript code in Frame3 is done, i.e., every statement of the code is executed.

The frame code is like is:
Code:
<frameset>
<frame name='Frame2' src='file0.htm' >
<frame name='Frame3' src='Code3.htm' >
</frameset>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top