Question

Iam working with a phonegap app, i have used InAppBrowser in my project but when i clicked the link, xcode console shows the below error:

"Failed to load webpage with error: The requested URL was not found on this server."

and my code will look like:

<a href=”#” onclick='window.open(‘www.google.com',’_blank‘,’location=yes‘,’closebuttoncaption=Return‘);'>Click Here</a>

iam using xcode 4.5 and phonegap 2.7.0. I really got stuck, please help.

Was it helpful?

Solution

I believe that the correct form of this should be

<a href=”#” onclick="window.open('http://www.google.com', '_blank', 'location=yes');">Click Here</a>

This is based on the documented version from the PhoneGap 2.7.0 Documentation.

It appears that the closebuttoncaption=Return parameter you have added is not actually in the specification.

OTHER TIPS

var myURL = encodeURI('http://www.google.com');
window.open(myURL, '_blank', 'location=yes'); 

You can refer below link :-

Phonegap App : External URL don't open in InApp Browser of IOS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top