preventing window-close after download

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-13-2004
geradeaus
 
Posts: n/a
Default preventing window-close after download

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!



Reply With Quote
  #2 (permalink)  
Old 12-14-2004
Daniel Tryba
 
Posts: n/a
Default Re: preventing window-close after download

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.

Reply With Quote
  #3 (permalink)  
Old 12-14-2004
geradeaus
 
Posts: n/a
Default Re: preventing window-close after download


>>
>> 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


Reply With Quote
  #4 (permalink)  
Old 12-14-2004
Tim Van Wassenhove
 
Posts: n/a
Default Re: preventing window-close after download

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>
Reply With Quote
  #5 (permalink)  
Old 12-15-2004
geradeaus
 
Posts: n/a
Default Re: preventing window-close after download


"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...


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:27 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0