I am trying to resolve an issue w/ window.open and window.focus. I have a page that is used to request reports by sending a request to a Crystal Server page. The user can request multiple reports at a time. The following code is used to generate the reports:
function callCrystal(){
//var win;
var features = new String(“”);
features = features + ‘toolbar=no,’;
features = features + ‘scrollbars=yes,’;
features = features + ‘location=no,’;
features = features + ‘statusbar=no,’;
features = features + ‘menubar=no,’;
features = features + ‘resizable=yes,’;
features = features + ‘width=500,’;
features = features + ‘height=400,’;
if(frmCrystalParams.txtParams.length>1)
{
for(i=0;i<frmCrystalParams.txtParams.length;i++)
{
var x= frmCrystalParams.txtParams[i].value;
win = window.open(‘http://<%=ConfigurationSettings.AppSettings[“CRYSTAL_SERVER”]%>/getparameters.asp?’+x,’popup’+i,features);
if (win.open) win.focus();
}
}
else
{
var x= frmCrystalParams.txtParams.value; win = window.open(“http://<%=ConfigurationSettings.AppSettings[“CRYSTAL_SERVER”]%>/getparameters.asp?”+x,”popup”,features);
if (win.open) win.focus();
}
}
We are trying to have the popup window maintain focus, but it doesnt work.
Focus returns to the page that created the new window.
The win.focus appears to be ignored. this is ie6
Does anyone have any tips? thanks.