Solved

firefox not opening some pdf documents in the browser

Posted on 2013-05-22
1
407 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
1 Comment
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Select2 jquery help 9 41
Exception in Log4Net 1 17
VB.NET HttpWebRequest 12 30
XML & .net 5 14
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The viewer will learn how to dynamically set the form action using jQuery.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now