preventing window-close after download

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • geradeaus

    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_l imiter('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!



  • Daniel Tryba

    #2
    Re: preventing window-close after download

    geradeaus <gehegeradeaus@ hotmail.com> wrote:[color=blue]
    > 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.[/color]

    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:

    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.

    Comment

    • geradeaus

      #3
      Re: preventing window-close after download

      [color=blue][color=green]
      >>
      >> 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.[/color]
      >
      > 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.
      >[/color]


      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


      Comment

      • Tim Van Wassenhove

        #4
        Re: preventing window-close after download

        In article <EOHvd.367$dq1. 240201781@hebe. telenet-ops.be>, geradeaus wrote:[color=blue]
        >
        > 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[/color]


        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>

        Comment

        • geradeaus

          #5
          Re: preventing window-close after download


          "Tim Van Wassenhove" <euki@pi.be> schreef in bericht
          news:3291ppF3jm ab2U1@individua l.net...[color=blue]
          > In article <EOHvd.367$dq1. 240201781@hebe. telenet-ops.be>, geradeaus wrote:[color=green]
          >>
          >> 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[/color]
          >
          >
          > Get yourself a browser that does what you ask it to do, instead of doing
          > what it wants to do.
          >[/color]

          I have one... but do all the users have too? But you need to test with ie...


          Comment

          Working...