0
votes

I have a site that lists customer letters, and when a letter's "view" button is clicked it uses JavaScript (window.open(url)) to open a new window to get the .pdf file, which I think is generated by crystal reports.

  • In IE8 on Windows XP it works
  • On Windows 7 it opens a blank page with the correct url, but it doesn't try and open the file
  • In any other browser on either OS it works
  • The machine has the latest Adobe Reader installed

In Win7/IE8 once the blank page is opened, if you then click on the url and hit enter, it will request the file again and correctly open it. I've looked at the requests with fiddler and they're exactly the same.

I'm setting the mime type to "application/pdf" and inline to true in the content-disposition header.

I can kludge it by returning a view that just sets window.location = url, but it feels awful. Is this a known issue? Is there any way to make it work in both IE versions?

1
Looks like the plugin only works for the acrobat reader and not acrobat itself. - NIlesh Sharma
The reader is all I need Nilesh - NickL

1 Answers

0
votes

Still no idea why there's the disparity between the two versions, but instead of JavaScript I'm now using target="_blank" on the element and that's done the trick.