By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,167 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

preventing window-close after download

P: n/a
Hi,

I use a php class to create pdf files (http://www.ros.co.nz/pdf/) ... but
when I download the created pdf, the browser window closes, and Acrobat
opens.

How do I prevent the closing of the original browser window? Maybe it has
something to do with cache, because most off the people using the website
don't have this problem.

Also , I need to use the session_cache_limiter('no-cache'); before I can use
the "open"-option after clicking on the download link.

ps: even if I use target="_blank" , both browser windows closes.

Thanks in advance!

Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
geradeaus <ge***********@hotmail.com> wrote:
I use a php class to create pdf files (http://www.ros.co.nz/pdf/) ... but
when I download the created pdf, the browser window closes, and Acrobat
opens.

How do I prevent the closing of the original browser window? Maybe it has
something to do with cache, because most off the people using the website
don't have this problem.


Sorry can't reproduce your problem. Opera and Fire* open a new
tab/window and offer a filedialog (leaving a unused window/tab
cluttering the desktop (very annoying)), mozilla refuses to open a new
window/tab so it doesn't work at all. So how did you test this?
BTW _new is a invalid target:
http://www.w3.org/TR/html4/types.html#h-6.16
Is the browsers you are using actually complying with w3c and ignoring
it!

Either use _blank _or_ the content-disposition to "force" download, not
both.

Jul 17 '05 #2

P: n/a

How do I prevent the closing of the original browser window? Maybe it has
something to do with cache, because most off the people using the website
don't have this problem.


Sorry can't reproduce your problem. Opera and Fire* open a new
tab/window and offer a filedialog (leaving a unused window/tab
cluttering the desktop (very annoying)), mozilla refuses to open a new
window/tab so it doesn't work at all. So how did you test this?
BTW _new is a invalid target:
http://www.w3.org/TR/html4/types.html#h-6.16
Is the browsers you are using actually complying with w3c and ignoring
it!

Either use _blank _or_ the content-disposition to "force" download, not
both.

Hi thanks for the answer. I know _new is not a valid target, but I didn't
mention it...did I? (I used target="_blank")

Maybe you can try the download at the following page :
http://www.charminghotel.be/hotel.php On the left off the page you will
notice the link "download hotel catalogus" (in Dutch). The first time you
click the link, the browser window won't close. Do it again at another page
(e.g. fly & drive), open it and the window closes... at least on my pc it
does SOMETIMES.

Now, it didn't close..but when I closed all my browser windows , opened one
again and downloaded the pdf it closed...

Any suggestions? :-s
Jul 17 '05 #3

P: n/a
In article <EO*********************@hebe.telenet-ops.be>, geradeaus wrote:

Now, it didn't close..but when I closed all my browser windows , opened one
again and downloaded the pdf it closed...

Any suggestions? :-s

Get yourself a browser that does what you ask it to do, instead of doing
what it wants to do.
--
Met vriendelijke groeten,
Tim Van Wassenhove <http://www.timvw.info>
Jul 17 '05 #4

P: n/a

"Tim Van Wassenhove" <eu**@pi.be> schreef in bericht
news:32*************@individual.net...
In article <EO*********************@hebe.telenet-ops.be>, geradeaus wrote:

Now, it didn't close..but when I closed all my browser windows , opened
one
again and downloaded the pdf it closed...

Any suggestions? :-s

Get yourself a browser that does what you ask it to do, instead of doing
what it wants to do.


I have one... but do all the users have too? But you need to test with ie...
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.