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

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

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

kvarnerexpress
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

Reply

DeveloperX
QUOTE

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
CODE
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

CODE

<head>
<script LANGUAGE="JavaScript">
<!-- hide javascript
function noframe(){
if (self.parent.frames.length != 0)
self.parent.location='http://www.kbapps.com';
}
// done hiding -->
</script>
</head>
<body onload=>

</body>



Notice from electriic ink:
Fixed quote tags

 

 

 


Reply

peroim
Just add a onload event on your popup for the basic window, before it fires, the page isn't loaded, after, it is.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.


*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for check, parent, page, loading, data

*MORE FROM TRAP17.COM*
advertisement



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



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE