PDA

Click to See Complete Forum and Search --> : javascript location


richy
Mar 2nd, 2001, 03:52 AM
I'm using the following to change the location of my frame, but it only works if I put an alert box in afterwards.

Works
--------
parent.mainFrame.document.location="http://www.teamtalk.com";
alert("hello");

Doesn't Work
-----------------
parent.mainFrame.document.location="http://www.teamtalk.com";


I assume it's because it needs a doevents of some kind. I've put in a parent.mainFrame.Refresh, which doesn't work without the alert box either.

Mark Sreeves
Mar 2nd, 2001, 04:46 AM
you don't need "Document" in there:

parent.mainFrame.location="http://www.teamtalk.com"

richy
Mar 2nd, 2001, 06:32 AM
i've just taken the document out, and it still doesn't work. any more ideas?

Mark Sreeves
Mar 2nd, 2001, 06:40 AM
well that's really wierd!
because that works fine for me in IE and NS

richy
Mar 2nd, 2001, 06:44 AM
can i send my file to your email address, and see if it works?

Mark Sreeves
Mar 2nd, 2001, 06:51 AM
OK but i'm off home in 5 minutes!

richy
Mar 2nd, 2001, 06:53 AM
what's your email address, because the email option on the profile isn't allowed.