Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

align=center a popup

Status
Not open for further replies.

gioby

Technical User
May 31, 2001
2
0
0
IT
hi, i wuold like to know how i can alin in the center of the page a popup i made from the behaviors of dreamweaver.
that's for the different screen's resolution of the users.
i don't know if i have to put the distance of the popup in percentual.
a lot of thanks to everyone will answer me. by
 
Here is an easy way to center a pop_up

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
// End -->
</script>

<a href=&quot;#&quot; onclick=&quot;NewWindow(this.href,'name','400','400','auto');return false;&quot;>Popup up</a>

Let me know if this help out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top