how to check if page is already loaded?

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jul 31st, 2005, 15:47
New Member
Join Date: Jul 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote

  #2 (permalink)  
Old Jul 31st, 2005, 16:52
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
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
Reply With Quote
  #3 (permalink)  
Old Jul 31st, 2005, 21:27
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #4 (permalink)  
Old Aug 3rd, 2005, 12:07
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #5 (permalink)  
Old Aug 3rd, 2005, 12:20
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
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
Reply With Quote
  #6 (permalink)  
Old Aug 3rd, 2005, 16:05
Highly Reputable Member
Join Date: Jul 2003
Location: Ipswich, UK
Posts: 690
Thanks: 0
Thanked 0 Times in 0 Posts


im sure its possible, maybe this will help?

http://www.quirksmode.org/js/croswin.html
Reply With Quote
Reply

Tags
check, page, already, loaded

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 19:13.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43