TwelvestoneFront End

stop the IE pop-up blocker from refreshing the parent page?


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
DontBogartMe
 
2010-02-23

I have a Flash app that at one point needs to save an image as a PDF - it does this by calling a PHP script in a new window that creates the PDF. This works fine - unless you try it in IE with the Windows pop-up blocker turned on.

What happens then is that when you click the button in Flash "Save to PDF" the pop-up blocker asks if you want to allow popups for this site - click on Allow temporarily, and it refreshes the page. In my app this causes the user to lose the data they've entered, and also, it doesn't even open the popup for you - you have to got thru the app again and click on Save to PDF and then it works.

I can't show you my app, but I found this Create ZIP file demo that works in a similar way and shows the same problem:

http://www.bytearray.org/?p=105

open it up in IE, with your popup blocker activated, scroll down 'til you see Stevie Wonder, type in something in the text box, then hit Generate ZIP. Once you click "allow popups" it will refresh the page.

Is there something I can do to stop it refreshing the page?

scudsucker
 
2010-02-23

It sounds as if IE is set to open PDFs in a new window - which would be regarded as a pop-up. (Although the ZIP example you give should also force a download)

I would go with forcing the browser to download the PDF as a file. It is very easy - see a tutorial at http://www.ryboe.com/tutorials/php-headers-force-download

It is this solution that I used (albeit in C#.net) with a Flash site that had multiple PDF downloads, most of them dynamic.

EDIT - after re-reading your problem, looks as if my solution is not a solution to that problem!

But I do not see the need to open a new window, if the flash movie calls a PHP page that forces the PDF to download, no browser window should be involved.

DontBogartMe
 
2010-02-23

thanks, but it still triggers the popup blocker.

My googling tells me it's due to the use of navigateToURL, making it a Flash problem really. I've found a workaround but it insists on an opaque Flash, whereas I need a transparent one.

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFront End

stop the IE pop-up blocker from refreshing the parent page?