title: Using Hashes in URL to Run Script onload
body: <p>I was wanting to make a link similar to this</p>
  
  <p>www.mysite.com/profile/#openTheme</p>
  
  <p>When the link has the hash "#openTheme" i want it to run a function on the page when the page is loaded.</p>
  
  <p>Is there a way to set an Anchor like this eg:</p>
  
  <pre><code>&lt;a name="openTheme" onActivate="runScript()"&gt;
  </code></pre>
  
  <p>Or is there a better way of doing it? Eg, running a script onload to find any location hashes and using if/else?</p>
  
  <p>Thanks.</p>