I've been working tirelessly on this project for several days, but have hit a roadblock and need some assistance. My goal is to open a PDF file sourced from a Dropbox account using JavaScript. The code works perfectly fine when uploaded through PhoneGap on iOS devices; however, the problem I'm encountering is that the PDF does not open in a new tab or window, leaving me stuck on the same page without an escape route. I've scoured various resources for solutions without any luck. Can anyone provide some guidance? Here's my JS code:
if(FileExtension!='xls' && FileExtension!='xlsx') {
var DownloadLink = getDownloadLink(data.contents[i].path);
output += '<li><a href="javascript:void(0);" onclick="window.open(\'https://docs.google.com/viewerng/viewer?url='+DownloadLink.url+'\', \'_blank\', \'_system\', \'location=yes\')">'+FileName+'</a></li>';
}
And here's my config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns:gap="http://phonegap.com/ns/1.0" xmlns="http://www.w3.org/ns/widgets" version="1.0.0" id="com.phonegap.helloworld">
<name>Forensic</name>
<description>
Forensic Medical Mobile Application
</description>
<author href="http://phonegap.com" email="[email protected]">PhoneGap Team</author>
<content src="index.html"/>
<!-- Plugin configurations and preferences -->
</widget>
Thank you.