Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

How Do I Check If A Parent Page Is Loading Data?

Recommended Posts

Hi.I have a popup window that opens when I click submit in it's parent window.Hitting submit (above) also request a new file from the server, and this can take some time to finish loading since I'm dealing with uploading files.I have tried to attach an onstop event to either window, document, or body in order to run some function if user hit stop button in parent window (not popup).I have no luck with making that work....so I thought I might be able to check, from popup, if the parent window still loads the new page.... and if not then just close it.If you know how I can detect when the user hit the stop button and then how to fire a function that would be great..it would have to work crossbrowser though (IE, FF, NE, OP)if not ....then I need a workaround..Regards

Share this post


Link to post
Share on other sites

I have a popup window that opens when I click submit in it's parent window.

 

Hitting submit (above) also request a new file from the server, and this can take some time to finish loading since I'm dealing with uploading files.

 

I have tried to attach an onstop event to either window, document, or body in order to run some function if user hit stop button in parent window (not popup).

I have no luck with making that work....

 

so I thought I might be able to check, from popup, if the parent window still loads the new page.... and if not then just close it.

 

If you know how I can detect when the user hit the stop button and then how to fire a function that would be great..

it would have to work crossbrowser though (IE, FF, NE, OP)

if not ....

then I need a workaround..

You should checks a

self.parent.location
If it changed or != start page URL, do something...

 

For example No frame page and redirect

from http://www.kbapps.com/webdesign/javascripts.html

 

<head><script LANGUAGE="JavaScript"><!-- hide javascriptfunction noframe(){if (self.parent.frames.length != 0)self.parent.location='kbapps.com'}// done hiding --></script></head><body onload=></body>
Notice from electriic ink:
Fixed quote tags
Edited by OpaQue (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.