title: jquery to change form target value
body: <p>I need to make a button's target different from the main submit value. I am using jquery with code below: </p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form action="somepage" id="cartform" target="_parent" method="post"&gt;
  </code></pre>
  
  <p>(So default action is parent)</p>
  
  <p>JQUERY:</p>
  
  <pre><code>$("#refresh").click(function(){
      $("#cartform").attr('target', '_self');
  });
  </code></pre>
  
  <p>("Refresh" is the form's extra button to keep the form in a popup box)</p>