title: Refresh and call function in script
body: <p>So I have a function in a script called <code>start()</code> and at the end of the <code>start()</code> function I will ask if the user if s/he wants to play again. If they do want to play again, i want the page to refresh and im doing this using <code>location.reload()</code> and then i want to start from the beginning of the start function again. However, when i simply do this...</p>
  
  <pre><code>location.reload();
  start();
  </code></pre>
  
  <p>it doesn't refresh the page. I was wondering if there is another way for me to go about doing this?</p>
  
  <p>More Info:</p>
  
  <p>this is a black jack game that i am creating for learning purposes.</p>
  
  <p>start function is called when a button is clicked.</p>
  
  <p>in the start function, the dealer and player cards will be shown and then the player has option to either hit or hold.</p>
  
  <p>I wanted all of the things done in the start function erased on the webpage and i done it by refreshing the page(it was the simplest way to me). and then i wanted to call the start function again when the page is refreshed and the user selects okay on the confirm dialog box that he wants to play again. </p>
  
  <p>**EDIT: <a href="http://jsfiddle.net/MAbgW/7/" rel="nofollow">http://jsfiddle.net/MAbgW/7/</a> my code is here. pls help if you're free. seems like an easy fix i think i might just be saying it in a confusing way.</p>