• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

urgent: Why my pop-up window wouldn't show up??

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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();

Any advice is welcome.
Thanks in advance.
Lily
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
lily ling
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Bodie

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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic