Onload Function Phonegap Android
Which code I need to replace with onload function? I create a phonegap project, when I run it on the browser it's work fine, the onload function work, but on my android device - no
Solution 1:
You can call function like this onLoad of page
document.addEventListener('deviceready', function(){ alert("hello") });
Dont forget to add cordova.js or phonegap.js to your html files
Updated As per the comments
help.js(another js file)
document.addEventListener('deviceready', LoadPage);
functionLoadPage()
{
window.alert("loadPage");
}
Here is a Simplest JSFiddle Demo, just follow the structure of Html file and run without adding extra files.
All the best
Post a Comment for "Onload Function Phonegap Android"