title: Make a link activate on doubleclick only
body: <p>I'm building a very simple web-based file browser for my website.</p>
  
  <p>I've styled my links to look like files and I want to be able to single-click to select them so I can do things like rename etc, and I want to be able to double-click to actually activate the link and download the file.</p>
  
  <p>I've come up with the following, but it looks ugly. Does anyone have a more elegant solution?</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  
  &lt;script type="text/javascript"&gt;
  
  function nullClick()
  {
      //do select stuff
      return false;
  }
  
  function dolink(link)
  {
      window.location(link.href);
  }
  
  &lt;/script&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;a href="http://pathtofile" onclick="return nullClick();" ondblclick="dolink(this);"&gt;Clicky&lt;/a&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>