My onclick functionality works in Android devices versions 4, but not in lower versions.
I am facing a similar problem with the CSS position:fixed
that did not work in Android devices with lower versions. The alternative I took up was iscroll, but I have yet to fix it up.
I am working in Phonegap/Android using Cordova 2.1.0 and Android 2.2.
My SQLITE plugin is compatible with Cordova 2.1.0.
HTML
<div id="wrapper">
<div id="scroller">
<ul>
<div id="header " class="header ">
<div id="header_title" class="header_title"> </div>
<div id="abc" class="abc"><img src="img/home.png" onClick="javascript:abc();"/></div>
</div>
</ul>
And another way of calling a page in Javascript is the following:
if(value_in_db==0) {
document.getElementById("xyz").innerHTML = '<img src="img/inactive.png" />'
} else {
document.getElementById("xyz").innerHTML = '<img src="img/active.png" onclick="xyz()"/> '
}
In the Function
function xyz(){
window.location.href="index.html";
}
Images are positioned perfectly. But when I click, it does not call and very seldon it calls.
Note:
All the functionalities work in the higher versions except the devices with lower versions of Android say version 2.2.1.
Please do guide me! How can i fix this?