?
Solved

firefox not opening some pdf documents in the browser

Posted on 2013-05-22
1
Medium Priority
?
437 Views
Last Modified: 2013-06-20
I want to open any pdf hyperlinkw on my web page in a new window. I have added the following jquery function to achieve this. It works fine on links like static.mozilla.com/moco/en-US/pdf/mozilla_privacypolicy.pdf  & they will open in the browsers window but other pdf hyperlinks when clicked open File save dialog and I need to save the document and then they open in Acrobat reader. I m using Firefox 21.0. Any ideas how can i open the documents in the browsers window

jQuery(function($) {
$('a[href$=".pdf"]').attr('target', '_blank');
}); 

Open in new window

0
Comment
Question by:mmalik15
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 39186801
Show us a link that doesn't work.  The most common reason would be that the server is not setting the proper MIME type for the file.  The PDF viewer in Firefox is not as good as Adobe Reader and some documents need to be opened in Adobe Reader to act right.  Last time I checked, the Firefox viewer did not let you fill out PDF forms.
0

Featured Post

Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question