title: Javascript method hangs before properly executing
body: <p>I apologize in advance for the long question.</p>
  
  <p>I am currently working on editing filelocker2 source code. It is a file sharing app. What I want to do is ensure that after a user is created, the first time they log on they should change their password. In terms of how the app works what is common to every first logon is the signing of the Terms of Service. `</p>
  
  <pre><code>if(document.referrer == "$fl.rootURL/sign_tos")
  
  {
  
      if (window.confirm('In order to proceed you are required to change your password'))
  
      {
  
      location.href = 'javascript:dismissStatusMessage();javascript:loadEditAccount()'
  
      }
  
      else
  
      {
  
      document.location.href = '$fl.rootURL/logout'
  
      }   
  
  }
  </code></pre>
  
  <p>`</p>
  
  <p>I placed this code in script tags after the body tag in the footer.tmpl file so the page could load fully before executing the method, however nothing happens.</p>
  
  <p>The web app continues without loading anything.</p>
  
  <p>At this point if I use the web development tools and run the debugger it gets to the normal page without loading the edit account box. The difference is now, that the page freezes and the debugger executes to completion. If I press pause then play it proceeds to execute the code and load the dialog. this is the method that should be executing but doesnt.</p>
  
  <pre><code>function loadEditAccount()
  {
  
      $("#userPassword").val("");
  
      $("#userPasswordConfirm").val("");
  
      getCLIKeyList();
  
      $("#editAccountBox").dialog("open");
  }
  </code></pre>
  
  <p>If I get my reputation up and can add images I will aim to better explain my problem.</p>
  
  <p>For the most part my question would be, how, without using the developer tools do I push the page to go through and execute the function.</p>
  
  <p>Ps: This is a task I was given after having done a 6 month Java course. I have no History whatsoever with web based languages.</p>