Thanks for all the help guys. The site works on desktop MSIE + Gears, desktop Firefox + Gears.
I will try and get it going on desktop Chrome + Gears tonight - looks to be something to do with the loading the first script using document.documentElement.firstChild.appendChild(script); before the page has rendered. Bill. On Oct 6, 8:34 am, Tobias Eisentraeger <[email protected]> wrote: > After the page loaded, i saw it still transmitting(via the small 3G logo > arrows). Then i waited 5 minutes, still just a white page.And as Cedric > writes, it also failes on my winXP Google Chrome Beta branch. And this is > the source from the desktop browser: > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" > "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd"> <html > xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta name = > "viewport" > content = "width = device-width, height = device-height, initial-scale=1.0;" > /> <meta name="HandheldFriendly" content="true" /> <link rel="shortcut icon" > type="image/vnd.microsoft.icon" > href="wtp2.ico<http://wtp2.appspot.com/mobile/wtp2.ico>" > /> <title>WTP Mobile</title> <script type="text/javascript" src=" > gears_init.js <http://wtp2.appspot.com/mobile/gears_init.js>"></script> <style > type="text/css"> #divMap { height: 400px; width: 100%; position: absolute; > left: 0px; top: 0px; border:none; } #divAction { position :absolute; > left:5px; top: 5px; z-index:999; font-size: small; font-family: Arial, > Helvetica, sans-serif; } #divMenu { width:100px; background-color:#E0E0E0; > border-style:solid; border-width:thin; border-color:#C0C0C0 ; padding: 2px > width:100px; font:inherit; } #divEnter { z-index:999; > background-color:#E0E0E0; padding: 4px; margin:0px; } input.menu { padding: > 1px; margin:1px; width:98px; font:inherit; } </style> </head> <body onload > ="initGears();"> <div id="divMap"> </div> <div id='divAction'> <input id=" > btnSelect" type="button" onclick='selectAction("Select")' value='Select' > style="display:none" /> <div id='divMenu' style="display:none;"> <input type > ="button" class="menu" onclick='selectAction("GpsOnce")'value='GPS > Once'/> <input > type="button" class="menu" onclick='selectAction("GpsTrack")'value='GPS > Watch'/> <input type="button" class="menu" onclick='selectAction("Find")' > value='Find'/> <input type="button" class="menu" onclick=' > selectAction("LoadRoute")'value='Load Route'/> <input type="button" class=" > menu" onclick='selectAction("Clear")'value='Clear'/> <input type="button" > class="menu" onclick='selectAction("About")'value='About'/> </div> <div id=' > divEnter' > <input name="txtAction" id="txtAction" type="text" style=" > display:none"/> <input type="button" id="btnAction" title="Do It" value="GO" > style="display:none" /> <input type="button" id="btnCancel" title = "Cancel" > value="X" style="display:none" onclick="closeMenu();"/> <select id="selDA" > onchange="disambiguate();" style="display:none;"> </select> </div> > </div> <script > type="text/javascript"> var STORE_NAME = "wtp2_mobile";var > MANIFEST_FILENAME = "gears_manifest.js"; var localServer;var store; // > Called onload to initialize local server and store variablesfunction > initGears() { //TODO display loading etc > document.getElementById("divEnter").style.display="none"; > if (!window.google || !google.gears) { alert("You must install Google Gears > to use WTP Mobile."); } else { localServer = > google.gears.factory.create("beta.localserver"); store = > localServer.createManagedStore(STORE_NAME); createStore(); }} // Create the > managed resource storefunction createStore() { store.manifestUrl = > MANIFEST_FILENAME; store.checkForUpdate(); var timerId = > window.setInterval(function() { // When the currentVersion property has a > value, all of the resources // listed in the manifest file for that version > are captured. There is // an open bug to surface this state change as an > event. if (store.currentVersion) { window.clearInterval(timerId); //enable > local cache store.enabled = true; //load OpenSpace from cache, calls loadApp > when done var script = > document.createElement('script');script.setAttribute('src', > 'openspace.js?key=538D84E3F0964985E0405F0AF06034FD&v=0.8.0&url=http%3A%2F% > 2Fwtp2.appspot.com'); script.setAttribute('type', > 'text/javascript');script.setAttribute('id', > 'OSScript');document.documentElement.firstChild.appendChild(script); } > else if (store.updateStatus == 3) {alert("Error: " + > store.lastErrorMessage);}}, 500);} // Remove the managed resource > store.function removeStore() { if > > (!window.google || !google.gears) { alert("You must install Google Gears to > use WTP Mobile."); return; } > localServer.removeManagedStore(STORE_NAME); } function > loadApp(){ //load app from cache var script = > document.createElement('script'); script.setAttribute('src', > 'mobile.js');script.setAttribute('type', > 'text/javascript');script.setAttribute('id', > 'MobileScript');document.documentElement.firstChild.appendChild(script);} > </script> </body> </html> > > On Tue, Oct 6, 2009 at 9:19 AM, bill chadwick > <[email protected]>wrote: > > > > > Thanks for that feedback. Any ideas why ? Error details available > > anywhere ? > > > It takes quite a while for all the App Files to load into the Gears > > offline store. > > > Bill > > > On Oct 5, 7:32 pm, Tobias Eisentraeger <[email protected]> > > wrote: > > > First asks for gears installation, after agree, just a white page. > > > > On Oct 5, 2009 7:45 PM, "bill chadwick" <[email protected]> > > wrote: > > > > Hi, > > > > I know there is already an Android app for UK OS mapping. > > > > I would be interested to know if this site > > > >http://wtp2.appspot.com/mobile/mobile.htm > > > > works on an Android Phone - press Select, About for info. > > > > It works, albeit a bit flakily, on WinMo 6.1 Proff + Opera Mobile 9.7 > > > beta. > > > > Any feedback gratefully received. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
