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

catching File Download event

Status
Not open for further replies.

marouanemeft

Programmer
Sep 29, 2004
10
US
I have an html form that has an iframe as it's target.
When the user clicks the submit button, I start a javascript timer and when the results displayed in my iframe I stop the timer by catching the onload event for my iframe.
The user can choose to download the results to disk instead of having them displayed on the iframe. But when the user chooses this option the iframe doesn't load anything and so I can not stop my timer.

Is there anyway I can write some hidden html to the iframe so it loads something so I can stop the timer. Or better yet is there anyway I can catch the File Download dialog pop up on the browser?


Thank you very much.
 
Can you periodically check the [tt].src[/tt] attribute of the iframe. It should change when the form is submitted.

[sub]Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
[/sub]

Webflo
 
I am actually trying to stop my timer when the server starts sending the response and not when the form is submitted.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top