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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scrolldown select form window movement

Status
Not open for further replies.

Hostmaster

Programmer
Sep 14, 2000
1
CA
Please help me. This has been going on too long.

<script language=&quot;JavaScript&quot;>
function surf(form)
{
var myindex=form.select4.selectedIndex
if (form.select4.options[myindex].value !=&quot;0&quot;) {
child = window.open(form.select4.options[myindex].value, target=&quot;main&quot;,&quot;resizable=yes, width=450, height=350, scollbars=yes, dependant=true&quot;);}
}
function movewin(child) {
var locationx = 20;
var locationy = 20;
window.moveTo(locationx,locationy)
}
</script>
<form name=&quot;form4&quot;>
<select name=&quot;select4&quot; onChange=&quot;surf(this.form)&quot;>
<option selected value=&quot;0&quot;>Select a Business or Group</option>

When I click on the form, I would like the window to open in the upper right hand corner but the function doesn't work. Thanks. [sig][/sig]
 
The line window.moveTo(locationx,locationy) is referencing the host window, not the new child window you just created. Fortunately, you have created it and given it the name child.

Try child.moveTo(locatoinx,locationy)

Russ [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top