Bookmarklet not working as it should (i think)
<p>Can someone tell me what I am doing wrong here...</p>

<p>This returns "Button Not Found"</p>

<pre><code>javascript:var nam="http://apps.facebook.com/onthefarm/giftaccept.php?senderId=547766125&amp;amp;gift=haitibackpack_item_single&amp;amp;timestamp=1285776944&amp;amp;ref=gift_accept_tab&amp;amp;key=6870697de39960508737349c7a3f1363%24%24ggM3T%2CPU2YKM2l0mNrM%28U%28b%21eHAoclFCBgwg49%21S34GWkEXxTekFN_Fkx5%2AUZPcNMEOj&amp;amp;signature=a86a9e11aab0051e3fde676a9abe4283&amp;amp;srcapp=FarmVille"; nam="actions["+nam.replace(/\&amp;amp;/g, "&amp;")+"]"; var els=document.getElementsByName(nam); if(els.length == 0) alert("Button not found"); else els[0].click();
</code></pre>

<p>This prompts me to enter a URL...I enter the EXACT same URL as in the above example and it works fine, clicks the button which brings me to the desired page. </p>

<pre><code>javascript:var nam=prompt('enter URL Please'); nam="actions["+nam.replace(/\&amp;amp;/g, "&amp;")+"]"; var els=document.getElementsByName(nam); if(els.length == 0) alert("Button not found"); else els[0].click();
</code></pre>

<p>Thanks</p>

<p>Before you ask...I've tried in Chrome, IE and Firefox.  It does not appear to be an issue with the length of the JS.  I get the same results as above regardless of which (valid) URL I use.  I am getting desperate here.</p>
