I develop a web app using the dojo framework. This app must be loaded by a browser using the file:/// protocol (It will become a Cordova/Phonegap application for Android/iPad). The index.html file looks like:
Head section:
<script type="text/javascript">
var dojoConfig = {
parseOnLoad: true
}
</script>
<script type="text/javascript" src=""dojo.js"/>
<script type="text/javascript">
dojo.require("dojox.mobile.parser");
dojo.require("dojox.mobile");
</script>
Body section:
<script type="text/javascript">
dojo.require("dojox.mobile.parser");
dojo.require("dojox.mobile");
</script>
It was taken from IBM lesson (Mobile application development, Part 1: PhoneGap and Dojo Mobile on Android)
So there are two problems:
1) dojo tries to load modules but failed to do it using the file:/// protocol. The HTTP protocol is requiered.
2) In the index.html I use a custom build of dojo made by the web builder. This build consists of a single file which contains modules I need. However these modules must be required which makes the framework try to load them from unexisting files though they has been already loaded in the big custom dojo.js
May be someone knows how to solve these two problems.