JavaScript Frames Manipulation
<p>I have a piece of javascript with Phonegap application which works nice on iPhone but on Android it doesn't work.</p>

<pre><code>var js = "var c = frames.content;";

js += "if (c.document.readyState == 'complete') {";

js += "var l = c.document.getElementsByName('login')[1];";

js += "var u = c.document.getElementById('user_id');";
js += "var p = c.document.getElementById('password');";

js += "if (u &amp;&amp; p) {";

js += "u.value = '" + getData("username") + "';";
js += "p.value = '" + getData("password") + "';";

js += "l.click();";

js += "}";

js += "}";
</code></pre>

<p>The Android browser says there is <strong>frames</strong> object which is of type DOMWindow but there is no child frame named <strong>content</strong>. What I am doing wrong?</p>

<p><strong>UPDATED</strong>
I solved it. I wasn't executing the JavaScript in the right WebView.</p>
