This is a discussion on preventing window-close after download within the PHP Language forums, part of the PHP Programming Forums category; Hi, I use a php class to create pdf files (http://www.ros.co.nz/pdf/) ... but when I download ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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! |
|
|||
|
geradeaus <gehegeradeaus@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. |
|
|||
|
>> >> 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 |
|
|||
|
In article <EOHvd.367$dq1.240201781@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> |
|
|||
|
"Tim Van Wassenhove" <euki@pi.be> schreef in bericht news:3291ppF3jmab2U1@individual.net... > In article <EOHvd.367$dq1.240201781@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... |