Phone gap with jQuery Mobile won't open internal links

I have an application to connect to a phone with jQuery mobile, and I can make external links work and work on one page, but I can not open another file in my application. All files are in the www folder. Error message "Error loading webpage with error: the requested URL was not found on this server. If I comment out the jquery-1.6.4.min.js file, it will work, but this is not a good solution. Try rel = "external" and a few other things I've seen in googling but nothing works

<!DOCTYPE html> <html> <head> <title></title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" /> <meta charset="utf-8"> <link rel="stylesheet" href="include/jquery.mobile-1.0.min.css" /> <script src="include/jquery-1.6.4.min.js"></script> <script src="include/jquery.mobile-1.0.min.js"></script> <script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script> <script type="text/javascript"> function onBodyLoad() { document.addEventListener("deviceready", onDeviceReady, false); } function onDeviceReady() { //do something } </script> </head> <body onload="onBodyLoad()"> <div data-role="page" id="manage"> <div data-role="content" id="inputs"> <a href="about.html">About</a> </div> </div> </body> </html> 
+4
source share
1 answer

Make sure you update the PhoneGap manifest. Find PhoneGap.plist, open it and find ExternalHosts. You need to add the URL one by one or just add the "*". This will allow you to use all the URLs in the application. PhoneGap blocks all URLs by default.

-one
source

Source: https://habr.com/ru/post/1394545/


All Articles