title: Fire a Javascript function after submitting a Gravity Form
body: <p>I have a multi-page form where the url remains the same when moving between pages.</p>
  
  <p>I am trying to change some HTML after the submit button has been clicked.</p>
  
  <p>I can run this in the console and the result is as I want it.</p>
  
  <p>How can I get this run after submit?</p>
  
  <p>I've tried <code>window.onload</code> and <code>document.onload</code> functions but they are not working. I've also tried an onclick function but it seems moving to the next page stops this working?</p>
  
  <pre><code>var confirm = document.getElementById('gform_confirmation_message_14');
  if(confirm) {
     document.getElementsByClassName("entry-title")[0].innerHTML = "PAYE Worker";
  }
  </code></pre>
  
  <p>Thanks</p>