This is a discussion on "how to check if page is already loaded?" within the JavaScript Forum section. This forum, and the thread "how to check if page is already loaded? are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
how to check if page is already loaded?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
how to check if page is already loaded?
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. |
|
|
|
||||
|
What you are trying do is not possible. At least if I understand you correctly.
To achieve this you would need to make use of XSS (Cross Site Scripting) and as XSS is considered a major security risk, it's locked down on nearly every browser. Sorry, but you will need another way.
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
|||
|
Well, it's generally not possible UNLESS you have control over the site in the new window as well. Then you can pass information back, like the URL. It's kind of a one direction deal for security reasons.
So, if you've got control of the pages in both windows let me know and I can explain more about it. |
|
|||
|
I think its is possible if you open a new window and give it a name, then you can set a timeout to wait for 15 seconds (or more) until the site in the new window has loaded/redirected, then grab the location.href from the window that you opened.
|
|
||||
|
Smokie....
Try that and let me know if it works!
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
|||
![]() |
| Tags |
| check, page, already, loaded |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| TOS check boxes must checked in register page [BASIC] | basketmen | Scripts and Online Services | 5 | Jan 13th, 2008 16:33 |
| How to check Google Page Rank using ASP | globalguideline | Classic ASP | 2 | Jan 2nd, 2008 00:34 |
| can't go to any other page until my page is completly loaded | khwabsheth | JavaScript Forum | 2 | Nov 7th, 2007 00:48 |
| Please check this page in safari | Lchad | Web Page Design | 6 | Feb 24th, 2007 00:11 |
| Please check page layout in PC IE | Pixelate | Graphics and 3D | 2 | May 10th, 2006 09:45 |