I am writing an ios app using Phonegap, all i need in my app is that when the phonegap call the index.html the html page will redirect the user to my web site the thing is that the html does not redirect the app to my site, i do not care if the phone gap open the safari i just need it to redirect it to my site my code is:
<html>
<head>
<script type="text/javascript">
function loadlink()
{
window.open("www.cnn.com");
}
</script>
</head>
<body onload="loadlink()">
</body>
</html>
Make your function look like this:
function loadlink() {
window.location.href = "www.cnn.com";
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With