What I ultimately need to do is run an $.ajax() call and then after that is run, open a new window.
$.ajax()
A use clicks on a \"Preview\" button that saves thei
I solved my case by making the Ajax call synchronous. E.g. (with jQuery):
$("form").submit(function(e){ e.preventDefault(); $.ajax({ async: false, url: ..., data: ..., success: function(results){ if(results.valid){ window.open(...); } } }); return false; });