Wednesday, March 9, 2016

reopen the "tab" or window when submitting a form

this worked for me on form submit to reopen the target window.. so it will call window.open on the same target (or new if changed) and then continue to submit the form.
        var open_target = function (form){
            var windowName = jQuery(form).attr('target');
            window.open("", windowName );
            return true;
        };
    <form target="_search_elastic" onsubmit="return open_target(this);">
      </form>