I use a js function to open a pop up window but every time when this function works, the pop up window never goes to the screen. Instead, it will display an icon on tool bar and when you click it, it will come to the position I gave it and display what I set. Why it would not show up as if somebody minimized its size ? the function body is : var ScreenWidth=window.screen.width; var ScreenHeight=window.screen.height; placementx=(ScreenWidth/2)-((600)/2); placementy=(ScreenHeight/2)-((300+50)/2); var WinPop=window.open("About:Subscriber RawData","","width=600,height=300,toolbar=0,location=0,directories=0,status=0,scrollbars=yes,menubar=0,resizable=0,left="+placementx+",top="+placementy+",scre enX="+placementx+",screenY="+placementy+","); var display = "<pre><font size='2' color='#00008b'>" + hiddenObj.value +"</font></pre>"; WinPop.document.write('<html>\n<head>\n</head>\n<body bgcolor="#cccccc">\n'+ display+ '</body></html>'); WinPop.focus();
It sounds like something on your page is getting the focus after your popup is opened. It isn't minimized, it's just behind another window. Your call to focus() should eliminate the problem, and in fact, it runs OK for me in IE6. What browser are you using?
Joined: Dec 03, 2001
You are right. Some other js function has set the focus to somewhere else. I took it off and it worked perfectly. Thank you very much. Lily