i need to position a javascript popup in the upper right corner of the screen, for which I am using screen.availWidth
<script type = "text/javascript">
function examplespop(url){
var position = screen.availWidth-700;
window.open(url, "Example Search", "width=700, height=900, left=position,top=0,menubar=0, status=0");
}
</script>
with this script, however, my popup is still left-aligned. the weird thing is that if i put actual figures (such as left = 300), the window will be positioned 300px from the left edge. but i can't figure out why it doesn't calculate properly the available width etc...
any idea what the problem is?
best,
tench
<script type = "text/javascript">
function examplespop(url){
var position = screen.availWidth-700;
window.open(url, "Example Search", "width=700, height=900, left=position,top=0,menubar=0, status=0");
}
</script>
with this script, however, my popup is still left-aligned. the weird thing is that if i put actual figures (such as left = 300), the window will be positioned 300px from the left edge. but i can't figure out why it doesn't calculate properly the available width etc...
any idea what the problem is?
best,
tench