-1

Am using

window.open(url, '_blank', 'location=no') 

to open external web page, wherein that web page contains pdf file links. The problem am facing is these pdf links are not working within that browser.

If I use

window.open(url, '_blank', 'location=yes') 

or

window.open(url, '_blank') 

is working as expected. In this scenario everything is working fine.

But since my requirement is to hide the address bar, am giving location=no as argument to window.open(). Here pdf links are not working inside web page which is opened via

window.open(url, '_blank', 'location=no')

How can I resolve this issue? Please give suggestions.

Uri Agassi
  • 36,848
  • 14
  • 76
  • 93
Suresh M
  • 59
  • 5
  • you can't open pdf in android, Try to use. google doc – Amit Prajapati Jul 11 '14 at 07:32
  • Please view this question that will help u . http://stackoverflow.com/questions/38462707/if-link-is-http-google-com-it-worked-but-if-i-change-link-to-my-pdf-url-i/38463242#38463242 – Hassan ALi Jul 19 '16 at 16:00

1 Answers1

0

Try this::

   $(".drawListItem").on("click",function(){

           var url = 'https://www.google.co.in';
           window.open("https://docs.google.com/gview?embedded=true&url="+url,"_blank","location=yes");

   });
Amit Prajapati
  • 13,525
  • 8
  • 62
  • 84