Call a js function after reloading page
<p>I have js following code. <code>createNote()</code> function is called when I click a "<strong>Crate Note</strong>" button on webpage </p>

<pre><code>function createNote() {
   alert( 'page created' );        // for example note is created here
   window.location = document.URL; // refresh page to show new added note
   showEditNotePopup(); 
}

function showEditNotePopup() { 
  alert( 'show note edit page' );  // for example edit note popup shown here
}
</code></pre>

<p>Above code is working and creating note and also refreshing page using <code>window.location = document.URL;</code>. But after reloading page it is not calling <code>showEditNotePopup(</code>) function. Is there any way to achieve this without using AJAX. </p>
