title: Facebook Tab Application Redirect
body: <p>I have a little ajax form on my Facebook Canvas Tab Application. If it the form posts successfully, no validation errors, I want to reload the page.</p>
  
  <p>I know that to navigate inside of a Tab Application you need to make sure that all of your links have a relative path relative to your canvas application url. Which all of my links do have. Therefore the post response has a relative path url. But I cannot seem to get the page to reload in the manner that I want.</p>
  
  <p>I have tried the following three methods with no success.</p>
  
  <pre><code>var form = document.createElement('form');
  form.setAction(myurl);
  document.getElementById('body').appendChild(form);
  form.submit();
  </code></pre>
  
  <p>and</p>
  
  <p><code>document.setLocation(myurl)</code></p>
  
  <p>and also</p>
  
  <pre><code>function simulateClick(obj) {
      var evt = document.createEvent("MouseEvents");
      evt.initMouseEvent("click", true, true, window,
  0, 0, 0, 0, 0, false, false, false, false, 0, null);
      var canceled = !obj.dispatchEvent(evt);
      if (canceled) {
          // A handler called preventDefault
          console.log("canceled");
      } else {
          // None of the handlers called preventDefault
          console.log("not canceled");
      }
  }
  </code></pre>
  
  <p>Is there a different way to approach this? Could my url be wrong(It has the same relativeness as the url's I am using in the links)? Can I raise a click event for a link using FBJS?</p>