# JS to open sized & positioned newwindow fails

**URL:** <https://forum.kirupa.com/t/js-to-open-sized-positioned-newwindow-fails/221015>\
**Category:** flash\
**Created:** [March 31, 2007, 4:44pm UTC](https://forum.kirupa.com/t/js-to-open-sized-positioned-newwindow-fails/221015 "2007-03-31T16:44:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![will\_s](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@will\_s](https://forum.kirupa.com/u/will_s)\
**Post date:** [March 31, 2007, 4:44pm UTC](https://forum.kirupa.com/t/js-to-open-sized-positioned-newwindow-fails/221015/1 "2007-03-31T16:44:21Z")

</div>

Anyone familiar with this?  
(I searched here for the subject and found some exchanges from 2002 and 2005 that came close but didn’t seem to resolve themselves successfully.)

/\*  
on (release) {  
getURL (“javascript:NewWindow=window.open(‘TriCarTop.html’,’’,‘width=700,height=644,left=0,top=0,toolba r=No,location=No,scrollbars=Yes,status=No, resizable=No,fullscreen=No’); NewWindow.focus(); setTimeout(‘NewWindow.moveTo(75,50)’,1500);void(0);”);  
}  
\*/  
It works but the opening is herky-jerky; the page opens in one place and then jumps to its correct position. It looks like a mistake.

So I modified it to remove the setTimeout and just changed the left and top entries from zeros to where I wanted it to open.  
Like this:  
/\*  
on (release) {  
getURL (“javascript:NewWindow=window.open(‘TriCarTop.html’,’’,‘width=700,height=644,left=200,top=175,to olbar=No,location=No,scrollbars=Yes,status=No, resizable=No,fullscreen=No’); NewWindow.focus(); void(0);”);  
}  
\*/  
This works–but only sometimes. Results vary from one trial to another, even though I’m emptying browser cache each time.

Any ideas? TIA  
[![](http://www.laflash.org/forum/images/buttons/edit.gif)](http://www.laflash.org/forum/editpost.php?do=editpost&p=9029)
