title: javascript click the flash/swf button on page
body: <p>I am working on iMacros script (iMacros is addon for FireFox and it supports JS). </p>
  
  <p>I want to write a JavaScript code which will click swf button and open it to read image file from Hard Drive and upload it to web form.</p>
  
  <p>This the HTML code of the form</p>
  
  <pre><code>&lt;ul id="plupload-container_post-ad_image-select" class="image-container-droppable"&gt;
  &lt;li id="image-upload-trigger-container" style="visibility: visible;"&gt;
  &lt;a id="plupload-select_post-ad_image-select" class="secondary button" href="#"&gt;Add image&lt;/a&gt;
  &lt;div id="p17fn085741qvovjsbhpcse1ff90_flash_container" class="plupload flash" style="position: absolute; top: 0px; background: none repeat scroll 0% 0% transparent; z-index: 99999; width: 90px; height: 27px; left: 0px; cursor: pointer;"&gt;
  &lt;object id="p17fn085741qvovjsbhpcse1ff90_flash" width="100%" height="100%" style="outline:0" data="/common/plupload/plupload.flash.swf" type="application/x-shockwave-flash"&gt;
  &lt;param value="/common/plupload/plupload.flash.swf" name="movie"&gt;
  &lt;param value="id=p17fn085741qvovjsbhpcse1ff90" name="flashvars"&gt;
  &lt;param value="transparent" name="wmode"&gt;
  &lt;param value="always" name="allowscriptaccess"&gt;
  &lt;/object&gt;
  &lt;/div&gt;
  &lt;/li&gt;
  &lt;/ul&gt; 
  </code></pre>
  
  <p>In FireBug I see that there is a function that might trigger the uploading.</p>
  
  <p><a href="http://prntscr.com/no5fl" rel="nofollow">http://prntscr.com/no5fl</a></p>
  
  <p>And here goes the code of function if it's necessary. <a href="http://pastebin.com/y48XzakJ" rel="nofollow">http://pastebin.com/y48XzakJ</a></p>
  
  <p>When I want to execute javascript code in iMacros I do it like this.</p>
  
  <pre><code>URL GOTO=javascript:some_javascript_command_written_in_one_line_of_code
  </code></pre>
  
  <p>What this does it pastes everything after URL GOTO=   into navigation bar.</p>
  
  <p>So I need the function which will help me and that I can execute it in iMacros in the way I just described it. Is this possible or do I have to explain more?</p>