title: JQuery - Can't reload the page
body: <p>i have one PHP page with a form, checkboxes and a submit button, and i inserted a if isSet at this button, to run a PHP script that i created when the button is clicked, at this case, my code deletes some values from the checked rows.</p>
  
  <p>The button is working fine, when i click at the button, it changes specific values.</p>
  
  <p>But i have to manually reload the page to see the values definitely eliminated, so i got the idea to auto reload the page when the button is clicked using JQuery, i'm using this simple script:</p>
  
  <pre><code>$('.delete').once('click', function(){
       window.location.reload(true);
      });
  </code></pre>
  
  <p>The problem is that when i click at the button, nothing happens, it reloads, but the values that i deleted still there, and i have to reload manually to kick the values that i eliminated.</p>
  
  <p>But when i click at the button again without checking nothing, it reloads, and refresh the page without the values that i deleted.</p>
  
  <p>I have to click two times at the button to kick out the deleted values.</p>
  
  <p>I'm using window load</p>
  
  <pre><code>   $(window).load(function(){
  </code></pre>
  
  <p>Here the code from the button:</p>
  
  <pre><code>&lt;input style='width: 50px;' class='delete' value='delete'  type='submit' name='del[]' /&gt;
  </code></pre>
  
  <p>I dont want to refresh using HTML, i prefere JQuery</p>
  
  <p>I have no idea why i can't refresh the page at the same time when i update my values.</p>
  
  <p>It must be because the PHP runs first...</p>
  
  <p>Can anybody help me? Thanks.</p>