I have a JavaScript chat client running in one browser tab (call it tab A). Now when a message arrives the user might be on another browser tab (call it tab B). I\'m looking
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;
};