innerDocument.getElementById(<elment ID>).click(); doesn't work in Firefox/chrome, in IE it works
<p><strong>I am working with Iframes for controlling the elements of iframe by automating it from the parent html file. 
I was trying to to click the link defined in iframe.html file from the test.html file using function click() on javascript while loading test.html :</strong></p>

<p><strong>Test.html file :</strong></p>

<pre><code>function handleMainOnload(){

    alert("main frame loaded");
    var innerFrame = document.getElementById("frame1");
    alert("hi-1" + innerFrame.ownerDocument.title);
    var innerDocument = frame1.document;
    alert("hi" + innerDocument.title);
    innerDocument.getElementById("input1").value = "Dynamically Inserted Text";
    innerDocument.getElementById("a1").click();
}

&lt;body onload="handleMainOnload();"&gt;
&lt;iframe id="frame1" src="iframe.html"/&gt;
</code></pre>

<p><strong>iframe.html file :</strong></p>

<pre><code>&lt;a id="a1" href="http://www.google.co.in"&gt; Google.. click&lt;/a&gt; 
</code></pre>

<p><strong>This achor id = a1 automatically get clicked onload of test.html in IE but doesn't work on any browser apart from IE. Please help.</strong></p>
