screenX and screenY are window properties supported by Netscape and
Mozilla-based browwsers and are not supported by MSIE. screenLeft and
screenTop are NOT equivalent MSIE properties.
Guys, guys (it's good I decided to check this thread, look what did ya
do'
When I say "do not trust completely to Microsoft" I did not mean
disregard whatever they say and paint your own picture of everything
from the scratch.
Of course event object has screenX and screenY properties and this is
exactly what you need. By some bug on MSDN site articles about "event"
and "window" are pointed by the same URL in IE (not my fault but sorry
anyway).
Here the manually edited URL to look for:
<
http://msdn.microsoft.com/library/d.../author/dhtml/reference/objects/obj_event.asp>
Here the script OP needs (IE only as requested, may play with delta (d)
to adjust it to your particular environment):
<script type="text/javascript">
function doPopup(evt,obj,url) {
var d = 10;
var w = 200;
var h = 110;
var x = event.screenX;
var y = event.screenY;
var x = ((x+w+d)>screen.availWidth)? (x-w-d) : x+d;
var y = ((y+h+d)>screen.availHeight)?(y-h-d) : y+d;
var winArgs = 'width='+w+',height='+h;
winArgs+= ',left='+x+',top='+y;
var win = window.open(url,'_blank',winArgs);
}
</script>
and somewhere in say 1001st cell of your table you have a link like:
<a href="javascript:void(0)"
onclick="doPopup(event,this,'foo.html')">Extra info</a>
P.S. And please note Microsoft changed the security limitations for
popups (I just discovered it). Despite it's still stated everywhere in
MSDN that width/height must be *equal or more than 100px*, in IE 6 it
must be *at least one pixel more than 100px*. So if you set say width
to 100px, IE will disregard it and it will use default width instead.
This is what meant by saying "do not trust completely to official
docs". But overall if Microsoft says that this is done for that and
have such and such properties, you have reasons to believe it.