pdf download save option destroys document object, Content-Disposition

J

JonCourt

HI

I have a problem specific to IE when I download a pdf
document (or any other binary type) and use the Content-
Disposition header to force a file download dialogue to
appear. When I save the document from the dialogue box
the document object of the frame used to submit the print
url no longer exists.

This problem only occurs when the save option is
selected, NOT when the view option is selected. It also
only occurs if I immediately click print again, if the
affected frame (main) is resubmitted the document object
is formed again (as expected) and the print works.


I'm using the following link to download a PDF document.
Note it calls to another frame.

<a target="hidden" href="#" onClick="top.frames
['main'].submitForPrint(); return true;"\>[an image]</a>

Where the submitForPrint method is as follows. This is
the method that fails because the document object is null
after a save operation during a previous download:

submitForPrint()
{
document.aForm.action=[pdf_url];
document.aForm.submit();
}

And the response headers are:

Content-Type: application/pdf
Content-Disposition: attachment; filename=fileName.pdf

Has anyone else encountered this problem and have they
found a way around please?

Regards
Jon Court
 
Joined
Jun 29, 2005
Messages
1
Reaction score
0
download-save destroys JavaScript document object

Do you use a standard build of IE or one compiled for your business? We have found the same problem, but only in our company specific build of IE. Maybe we work at the same company (begins with "F", rhymes with "Schmidelity")?

I have not found a solution yet (besides using a different browser). Have you?
 
R

Robert Aldwinckle

TrombaMarina said:
Do you use a standard build of IE or one compiled for your business? We
have found the same problem, but only in our company specific build of
IE. Maybe we work at the same company (begins with "F", rhymes with
"Schmidelity")?

I have not found a solution yet (besides using a different browser).
Have you?


Who are you responding to?

If you are going to try to respond to threads which are almost a year old
please at least copy the full text of the message you are replying to.

http://groups-beta.google.com/group...or:trombamarina&rnum=1&hl=en#30b3041c5b90fb0b

(Google search for this post's author. This one is so old it has even been
aged out of the MS web interface to news!)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top