strange issue with js in updatePanel
<p>I have a link <strong>in an update panel</strong> which calls a js method to do printing of the current window:</p>

<pre><code>&lt;a href="javascript:print()" id="cpMain_popupCouponDescriptionControl_hrefPrint"&gt;Print Coupon&lt;/a&gt;
</code></pre>

<p>where the js method is called on Page_Load event:</p>

<pre><code>private void loadJs()
{
    String flashMap = "script";
    if (!Page.ClientScript.IsClientScriptBlockRegistered(this.Page.GetType(), flashMap))
    {
        ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), flashMap, "function print(){ alert('test'); window.print(); return false; }", true);
    }
}
</code></pre>

<p>When pressing the link, the alert window is shown multiple times (after I click "Ok", which seems strange) but window.print() is never called (a new tab for printing is not opened).</p>

<p>If I directly call <code>javascript:window.link</code> from <code>href</code> it works, but because the link is contained in an update panel, it no longer works second time (that's why I tried to register the script).</p>

<p>Can anybody see the issue here?</p>
