aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes focus not coming for window Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "focus not coming for window " Watch "focus not coming for window " New topic
Author

focus not coming for window

Rakesh Kumar
Ranch Hand

Joined: May 30, 2006
Posts: 63
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.

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: focus not coming for window
 
Similar Threads
Jdialog not getting focused in IE9
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE in /mnt/CPSW/tmp/emts/web/2-STA-ALM-
Running applet by clicking a hyperlink
Check if popup window is already open from parent window?
Running an applet by clicking a Button on HTML page