PDA

View Full Version : window open () top and left help


alaios
08-10-2002, 06:34 PM
<select name="select" size="1" onChange="window.open( document.form1.select.options[document.form1.select.selectedIndex].value,'temp','width=200,height=300,top=???,left=??? ');" >
<option selected value="#">proigoumena poll</option>


I want to center the new window right in the screen (screen.availWidth-200) and
(screen.availHeight/2-300)
What I must write in the ???. I am trying to use javascript in top and left but I cannot.
Can u help me?

duniyadnd
08-10-2002, 06:55 PM
between your <head> tags

function one(){
win1=window.open( document.form1.select.options[document.form1.select.selectedIndex].value,'temp','width=200,height=300');
win1.moveTo(screen.width/2-268,screen.height/2-225)
win1.focus()
}

***********

<select name="select" size="1" onChange=" one(); " >
<option selected value="#">proigoumena poll</option>

This should work, i didn't have time to test it, if it continues to give problems, let me know, I need to get a shuteye.

Duniyadnd

:eek: ---> I don't know, could that be a <YAWN>