I am using a passthru page to determine what type of form to include(closed or open). I have to keep the 2 different forms since they access different tables, parameters, etc.
When I submit the form I use a new window as the target and want to replace the passthru page (order_lookup.asp) with the original lookup screen (_csinquiry.asp).
I was able to do that fine, but when I run the location.replace portion the passthru page comes into focus (with user input erased) until the page is replaced and the form post data is loaded. I made the fixWindows code part of the form submit but it had the same behavior.
I'd rather replace the location on order_lookup.asp without bringing the page into focus. I have no control over the new window since it's part of Business Objects XI. Does anyone know how to handle that from the passthru page? This is an intranet site so we have a captive audience of IE 5.5+ users...
My code as it stands now:
FORM TAG (could be vwClosedOrder too)
BODY TAG
SUBMIT CODE
When I submit the form I use a new window as the target and want to replace the passthru page (order_lookup.asp) with the original lookup screen (_csinquiry.asp).
I was able to do that fine, but when I run the location.replace portion the passthru page comes into focus (with user input erased) until the page is replaced and the form post data is loaded. I made the fixWindows code part of the form submit but it had the same behavior.
I'd rather replace the location on order_lookup.asp without bringing the page into focus. I have no control over the new window since it's part of Business Objects XI. Does anyone know how to handle that from the passthru page? This is an intranet site so we have a captive audience of IE 5.5+ users...
My code as it stands now:
FORM TAG (could be vwClosedOrder too)
Code:
<form name="vwOrderOpen" method="post" action="/authBOXIViewer/View_CR_Report.aspx" target="newWin">
BODY TAG
Code:
<body onLoad="chkAutoSub()" onBlur="fixWindows()">
SUBMIT CODE
Code:
function chkAutoSub(){
if (frmAutoSub == "closed") {
document.forms["vwOrderClosed"].elements["vParam-CUST_NO"].value = sCustNo;
document.forms["vwOrderClosed"].elements["vParam-SHIP_TO"].value = sShipTo;
document.forms["vwOrderClosed"].elements["vParam-DOC_NO_ALPHA"].value = sDocNo;
newWin=window.open('','newWin','');
document.vwOrderClosed.submit();
} else if (frmAutoSub == "open"){
document.forms["vwOrderOpen"].elements["vParam-CUST_NO"].value = sCustNo;
document.forms["vwOrderOpen"].elements["vParam-ORD_NO"].value = sOrdNo;
newWin=window.open('','newWin','');
document.vwOrderOpen.submit();
}
}
function fixWindows(){
window.location.replace("_csinquiry.asp");
window.newWin.focus();
}