By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,599 Members | 1,872 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,599 IT Pros & Developers. It's quick & easy.

IE save the pdf file in wrong file

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.