title: Replace submit button with loading gif
body: <p>I'm not a jquery expert by any means and I cannot figure this out. </p>
  
  <pre><code>&lt;input class="button" name="save" type="submit" onclick="$(this).replaceWith('&lt;img src=images/loading.gif /&gt;'); console.log(this); $('#myForm').submit();" value="SUBMIT"&gt;
  </code></pre>
  
  <p>The code does replace the button but with a broken image icon. However, if I right click the broken image and copy the url its the correct and valid path to the loading.gif.</p>
  
  <p>I also have added the <code>&lt;script&gt;</code> tags in the <code>&lt;head&gt;</code>.</p>
  
  <p>Anybody have an idea to fix this?</p>
  
  <p>Thanks</p>