Car Insurance - Gourmet Chocolate Assortments - Mortgages - Remortgaging - Home Loans

PDA

View Full Version : how to check if page is already loaded?


phpworker
Jul 31st 2005, 8:55 am
Hi there! this is my situation:
1. open window with specified URL that points to a website.
2. the website is redirected to another URL by script of that website.
3. get the URL the website was redirected to.

The problem is between points 2 and 3. How javascript might recognize if website is already reloaded, so it can get the new URL of it?

I tried to do something like that:
while (!newwindow.location)
{ }
newurl=newwindow.location.href;

but it returns address of blank page. Also tried to use:

<META HTTP-EQUIV="refresh" CONTENT="5; URL='+url+'">

in new window - no reaction.

Any answer would be very appreciated, thank you.

J.D.
Aug 1st 2005, 9:58 pm
When the page is fully loaded, its onload handler gets called. That's your clue.