Dear friends,
I am developing an application in which an
applet is loaded on a webpage and has a button on it.on click of the button the applet comes as a window. and the previous location is loaded with "mainDataFrame.php".The code is as follows
top.MainDataFrame.location.href="mainDataFrame.php";
var width = 900;
var height = 450;
var wleft = (screen.width - width) / 2;
var wheight = (screen.height - height) /2;
top.almWin = top.SectorFrame.window.open(top.contextId+"-STA-ALM-MON.html?CR=true&MJ=true&MN=true&WA=true&RefreshDuration=600","almWin","width="+width+",height="+height+","+"left="+wleft+",top="+wheight+","+"location=no menubar=no"+"status=no,toolbar=no,scrollbars=no,resizable=yes");
top.isAlarmMonRunning =0;
top.almPoppedUp = 1;
almWin.focus();
top.almWin.moveTo(wleft,wheight);
The issue is eventhough i am calling " almWin.focus();
" the focis is not coming to the openend window. I think the focus is going to "top.MainDataFrame.location.href="mainDataFrame.php";
" because if i conmment "top.MainDataFrame.location.href="mainDataFrame.php";
" it is working fine ie the window gets focus.