title: Cross Browser Automatically Click Link On Page Load with Javascript
body: <p>I have a simple html page with an iframe image link. After the page loads I want the link to be clicked automatically. I need the link to be clicked instead of doing a meta refresh so thats out of the question. I searched around and It seems like FireFox does not support any methods to do so...There has to be a cross browser solution. Here is what I have so far but it wont work...why?</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  window.onload=functionName;
  $(document).ready(function(){
    $('#clicked').trigger('click')
  });
  &lt;/script&gt;
  
  &lt;div id="clicked"&gt;
        &lt;iframe src="http://mysource.com" width="40" height="10" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"&gt;&lt;/iframe&gt;
    &lt;/div&gt;
  </code></pre>