Forum Moderators: open
I'm up to my ears in xy coordinates and still I'm unable to resolve my problem...how to position the location of a popup on a page.
I prefer to limit javascript to bare-bones, and keep any and all of it down towards the bottom of an html document.
For a site I'm building, I use three popups per page (for contact, link-to-us and a disclaimer). The below is how one of them is configured.
Link to contact is:
<a href="javascript:openpopup()">Contact</a>
Script action:
<script type="text/javascript" CHARSET="ISO-8859-1">
function openpopup(){
var popurl="contact.html"
winpops=window.open(popurl,"","width=420,height=400,scrollbars,resizable,")
}
</script>
Now, using the simple protocol above, any advice for how can I tweak the script to position the popup to an absolute top-left location would be most appreciated.
...if possible without adding anything else to head tags or body.
Thanks,
Texas
theChild = window.open("colour.htm?c="+bgc, "colourWindow", "height=121,width=145,screenX=200,screenY=200,left=200,top=200"); Seems to work just fine...just what I wanted.
Here's what I used from your example:
<script type="text/javascript" CHARSET="ISO-8859-1">
function openpopup(){
var popurl="contact.html"
winpops=window.open(popurl,"","width=420,height=400,scrollbars,resizable,screenX=2,screenY=2,left=2,top=2,")
}
</script>
Many thanks!
Texas