View Full Version : Popup window in IE8 disappears at the bottom of the screen

09-21-2011, 10:14 PM

I have existing code that works in IE6 but not in IE8.
My jsp page has a table on it and every record in that table has a link displayed as short string.
Once you click on the link, the popup is displayed. The problem happens when the table has many records, the page becomes scrollable.
So if you click on eg. first 10 links you can see the popup, but further down you go, the popup moves down as well and it finally disappears from the screen.
It is still there just not visible. In IE6 it also moves but it stops at the bottom of the screen.

The code that is used for displaying popup:
var iGlobalPopup = window.createPopup();

//if this is for IE
if (isIEBrowser()) {
// Create the popup window
var lPopupDocument = iGlobalPopup.document;

// Create the html outline for the popup window
var lHtml = "<html><head>" +
"<div class='descTitle'>" + aTitle + "</div>" +
lSpan.innerHTML + "</div>" +

// Write the html to the popup window
lPopupDocument.open( "text/html", "replace" );
lPopupDocument.write( lHtml );

var lXPos = window.event.x;
var lYPos = window.event.y;

// Show the window
iGlobalPopup.show(lXPos, lYPos, 400, 200, document.body);

What can I do to keep the popup visible on the screen?

Any help greatly appreciated.