I have a function JavaScript that i want to inject in a Html, with the WebView. I can inject small pieces of JavaScript code with loadUrl("javascript:..." but when i try to insert the code does not work.
Code:
<script type="text/javascript" language="javascript">
var i = 0;
function timer() {
tot = document.links.length;
if (i < tot+1) {
document.getElementById('link'+i).focus();
i++;
setTimeout("timer()", 1000);
}
if(i==tot)
i=0;
}
setTimeout("timer()", 1000);
</script>