function openInAppBrowser(url)
{
//alert("openInAppBrowser");
try {
ref = window.open(encodeURI(url), '_blank', 'location=no,enableViewPortScale=yes');//encode is for if you have any variables in your link
}
catch (err)
{
alert(err);
}
}
And the link that opens the InAppBrowser looks like this:
Or if you want to open a pdf file in a iframe, then you have to scale down the page, otherwise the pdf won´t display correctly.
Something like this.
<div class="theiframewrap">
</div>
and the css:
.theiframewrap {
width: 320px;
margin:0px;
padding: 0px;
position:relative;
overflow:hidden;
}
.theiframeid {
height:30000px;
width:640px;
margin:0px;
-ms-zoom: 0.30;
-moz-transform: scale(0.30);
-moz-transform-origin: 0 0;
-o-transform: scale(0.30);
-o-transform-origin: 0 0;
-webkit-transform: scale(0.30);
-webkit-transform-origin: 0 0;
}
Hope it helps.