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

Retrieve if page has loaded

Status
Not open for further replies.

darkyoda2

Programmer
Sep 4, 2002
8
CA
Here is what I'm trying to do. My main page (page A) open a page (page B) with window.open() and automatically see if the link is correct. How can I do this? The two pages are on the same domain so I can access the properties of page B. Note that I can't modify the code of page B.

So I've tried to retrieve the tile (because the title looks like this when the link in not correct: "Error - blabla") of page B with the following command:

b = window.open(page B);
document.write(b.document.title);

but this write nothing on page A and gave no error. I can however access other porperties of page B. So how can I retrieve the title of page B from page A? If you have other suggestions don't hesitate.

What I want to do is check if page B is not in error (like a 404 error) when page A open it.
 
does this work?

b = window.open(page B);
document.write(b.document.location.href);

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook
 
Yes but I want to retrieve something that there is an error in Page B like the title can. I already have the href of page B in the window.open() command. Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top