472,809 Members | 2,540 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,809 software developers and data experts.

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!

Jul 17 '05 #1
4 2586
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

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

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: alanstew | last post by:
With the body tag calling out 'window onload', a function with a 'window.open' fails at the 'window.open' line. If I cut out the body tag, the function executes as normal. At first I thought it...
5
by: Eli | last post by:
Hi, I'm using an IFRAME which in there I can load any site. But there are some sites that check if they're in a frame and reload the whole window. This disrupt my whole page. Some questions:...
7
by: Miktor | last post by:
At the minute I am using the following rather unwieldy function to prevent the console window in Dev C++ from closing before I can see the output from my program: // function to prevent the...
2
by: Zlatko Matić | last post by:
Hi! How to prevent opening the database window (tables, queries, modules) in MDE? I have created MDE and set in Startup that database window is not visible. I also disabled Access shortcut...
3
by: NL | last post by:
Hi, Does anybody know how to turn off the animation Windows does with a window as it's minimized/maximized to the taskbar? I have an app which, when minimized, syncs to any other open...
3
by: anand | last post by:
hi, i am using axwebbrowser in an application. now, if the webpage has a javascript with window.open(), a pop up window opens. i want to catch the event just before axwebbrowser spawns a new...
2
by: Chad | last post by:
I am in the process of writing an application that detects the insertion of a pen drive, and if a specific folder structure exists, it shows a form containing data. The problem is that when I...
1
by: R Reyes | last post by:
Hi, For some reason, the website I made does not open pages in a new page whenever I right-click "Open in New Tab" or "Open in New Window". But, as soon as I navigate to any other website, the...
2
by: Khnumtemu | last post by:
Hello all, I am trying to change a line of text when a user uses the back button to return to a page what I have at the moment is this: <script> if(window.location == window.location){ ...
2
by: thread | last post by:
Hi All i'm building a database in access and i want to restrict permissions. from the access i can just limit the posiblity to unhide an hidden table and in this way i can preventing the users...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.