Disabling onclick() after 1 click
<p>I am having a little trouble with a JS event. I have an  link that calls the onclick event which opens up a photo in a popup modal window - facebox.</p>

<p>When the user single clicks on the link the image file name attached to that link is passed to the modal window, however if the user double clicks the image file opens twice in the modal window.</p>

<p>I have tried a simple ondblclick="" and ondblclick="return false" to stop this but it seems the browser still interprets it as 2 single onclick() events.</p>

<p>Can anyone suggest a fix or a solution whereby the  link is temporarily disabled after the 1st click?</p>

<p>Here is the code below that is calling the event:</p>

<pre><code>&lt;a href="javascript:void(0);" onmouseover="setVisibility(\'deletephotodiv'.$do.'\', \'block\');" onmouseout="setVisibility(\'deletephotodiv'.$do.'\', \'none\');" ondblclick="parent.jQuery.facebox({ ajax: \'profile/previewphoto.inc.php?photo=',$_SESSION['images'][$do]['name'],'&amp;album=',$_SESSION['images'][$do]['albumname'],'\' }); "&gt;
</code></pre>

<p>Thanks in advance</p>

<p>Wayne</p>
