Help please - conditionally open top window

B

boyscout

I won't admit how long I've been chewing on this! :)

ASP.NET project. Desired function: user clicks link to download file. If
no errors (file exists, etc.) then the standard Windows file
open/save/cancel dialog pops up over top of the application page. User
completes dialog, file downloads, and upon completion of download the
Windows dialog disappears and the application remains as it was, with focus,
ready for further use. However if an error occurs, a popup window appears
over the application window advising of the error. When the user closes the
popup, the application remains beneath it ready for further use.

I have this working fine when no errors using a trick found on tucows.com.
Each download link includes target="download" where "download" is a 1-pixel
by 1-pixel <iframe> on the page offering the download links. The <iframe>
is so small it's invisible, so the Windows download dialog pops up while the
application page remains unchanged underneath.

However if an error occurs before or during file download, any error
information reported ALSO gets sent to the 1 X 1 <iframe> and is therefore
invisible.

I've tried popups and alerts but they don't appear either - the <iframe> is
like a black hole for all output, and top.location.replace doesn't seem to
help either. Is there a way to "bust out" of the
iframe?

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,150
Latest member
MakersCBDReviews
Top