html5 - dojo mobile with phonegap doesn't work properly -


i start write application using phonegap , dojo in eclipse. phonegap, without dojo work on android emulator , in chrome ripple addon. problem when added dojo project. use phonegap 2.7.0 , dojo 1.9.0. using: http://www.ibm.com/developerworks/web/library/wa-mobappdev1/ tutorial setup this.

how setup dojo:

enter image description here

index.html file:

<!doctype html>  <html>      <head>          <title>phonegap</title>          <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>         <meta name="apple-mobile-web-app-capable" content="yes" />         <link rel="stylesheet" href="libs/dojo/dojox/mobile/themes/android/android.css" type="text/css" media="screen" title="no title" charset="utf-8"/>         <script type="text/javascript" src="libs/dojo/dojo/dojo.js" djconfig="parseonload:true"></script>         <script type="text/javascript" charset="utf-8" src="cordova-2.7.0.js"></script>          <script type="text/javascript" charset="utf-8" src="funkcja.js"></script>         <script type="text/javascript">           dojo.require("dojox.mobile.parser");           dojo.require("dojox.mobile");           dojo.require("dojox.mobile.app");           dojo.require("dojox.mobile.button");         </script>     </head>      <body>          <div dojotype="dojox.mobile.view" id="site" selected="true">             <h1 dojotype="dojox.mobile.heading">index</h1>             <div>                 <input dojotype="dojox.mobile.button" type="button" id="submit" name="submit" value="button" onclick="loguj()"/>              </div>           </div>      </body>  </html> 

in emulator blank screen.

in chrome using ripple html without dojo scripts. scripts include. in console errors:

console cleared ripple.js:37 ripple :: environment warming (tea. earl gray. hot.) ripple.js:37 uncaught syntaxerror: unexpected token u insertion.js:1 http://localhost/config.xml 404 (not found) ripple.js:50 cordova :: initialization finished (make so.) ripple.js:37 http://localhost/libs/dojo/dojo/fx/toggler.js 404 (not found) ripple.js:50 error {src: "dojoloader", info: "xhrfailed"} dojo.js:15 http://localhost/cordova_plugins.json 404 (not found) ripple.js:50 uncaught syntaxerror: unexpected token < cordova-2.7.0.js:6816 http://localhost/libs/dojo/dojo/resources/blank.gif 404 (not found) app.js:15 deviceready has not fired after 5 seconds. cordova-2.7.0.js:6672 channel not fired: onpluginsready cordova-2.7.0.js:6665 channel not fired: oncordovaready cordova-2.7.0.js:6665 channel not fired: oncordovaconnectionready cordova-2.7.0.js:6665 deviceready has not fired after 5 seconds. cordova-2.7.0.js:6672 channel not fired: onpluginsready cordova-2.7.0.js:6665 channel not fired: oncordovaready cordova-2.7.0.js:6665 channel not fired: oncordovaconnectionready cordova-2.7.0.js:6665 

dojo tries load js files, can't. think answer may work too:

phonegap / cordova 1.6 , dojo 1.7.2 amd works web, not local?

set djconfig of dojo.js djconfig="async:false,parseonload:true" and load cordova.js before dojo.js !

if doesnt work & want start developing, try use dojo.js web.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -