473,394 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

IE save the pdf file in wrong file

Hi,

I've had the following URL that generated by the javascript. It works
as "down a pdf file"

https://10.10.10.167/portal/servlet/...e=tmp36237.pdf

I expected that the pdf filename should be tmp36237.pdf, however if I
opened it in IE, it saves the file with a filename project.pdf.
If I am using firefox, it saves the correct filename.

I wonder if anybody can help me on this issue.

best regards,

Kit

--- My code ----
I've had the correct filename right from alert() though...

function download_pdfFile() {
alert ("This is an alert: " +
"servlet/project.SaveFile?PageUrl=ReportManager&FileName=" +
_PdfFileName, "_blank");
window.open("servlet/project.SaveFile?PageUrl=ReportManager&FileName="
+ _PdfFileName, "_blank");
}

Sep 12 '06 #1
1 1417
tikcireviva wrote:
I've had the following URL that generated by the javascript. It works
as "down a pdf file"

https://10.10.10.167/portal/servlet/...e=tmp36237.pdf

I expected that the pdf filename should be tmp36237.pdf, however if I
opened it in IE, it saves the file with a filename project.pdf.
If I am using firefox, it saves the correct filename.

I wonder if anybody can help me on this issue.

Well, since Servlets are basicly CGI's written in a JAVA context,
if you change the URL to look like below, the "/tmp36237.pd" should
hopefully get split off by the sever side to become PATH_INFO while
at the same time hopefully making IE see the filename as tmp36237.pdf
https://10.10.10.167/portal/servlet/...e=tmp36237.pdf
Sep 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Stacey Levine | last post by:
Ok.. Maybe I am trying the wrong approach. If given a URL to a graphic, I want to save that graphic to a local file. The approach below gets the response, but I can't quite figure out how to save...
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
4
by: Matt | last post by:
Hi, I would like to save a file locally (on the client computer) in an ASP.net application. It is like the server would return some data that the user can save to a file on his local PC. The ASP...
4
by: kev | last post by:
Hi folks, I have created a database to store information on equipments. During the first level of registration, there is a form that i need the user to fill up details on the equipment testing....
12
by: =?Utf-8?B?RnJlZU5FYXN5?= | last post by:
Hello, the scenario: There's an ASPX page which shows some text and has three buttons at the bottom: Save, Print and Close. Print and close is done by javascript. But how can I save the page...
1
by: rn5a | last post by:
When users submit a Form with a SQL query, the resultset is retrieved from a MS-Access database table which is then exported to an MS-Excel worksheet. After the records get exported to MS-Excel, I...
3
by: Koliber (js) | last post by:
sorry for my bad english when I fire up (from my c# code) a standard "file - save as " dialog, and when chosen location is a shered local network directory, where I do have rights to create...
3
by: =?Utf-8?B?Um9nZWxpbw==?= | last post by:
I'm having the wierdest problem. I'm trying to save images into a SQL 2005 database. the field is just called "IMAGES" and hte data type is "image". here is my code to save //following code...
2
by: Piotrekk | last post by:
Hi I have a problem. I open bitmap file, load it to memory decrease color palette by proceeding Euclidean distance. As a result i have image reduced to - for example 18 colors. Once i save it -...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.