Pdf file url's are not working in phonegap

2019-09-19 17:59发布

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.

1条回答
再贱就再见
2楼-- · 2019-09-19 18:25

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");

   });
查看更多
登录 后发表回答