"); } function openHundred() { one=open("","one","height=175,width=175,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=no,left=100,top=100"); one.document.write("Windows!" + "" + "" + "" + "
" + "

" + "This window is:
" + "100 pixels from left
100 pixels from " + " top
.

"); } function openTwohundred() { two=open("","two","height=175,width=175,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=no,left=200,top=200"); two.document.write("Windows!" + "" + "" + "" + "
" + "

" + "This window is:
" + "200 pixels from left
200 pixels from " + " top
.

"); } function openThreehundred() { three=open("","three","height=175,width=175,status=no,toolbar=no,directories=no,menubar=no,location=no,resizable=no,left=300,top=300"); three.document.write("Windows!" + "" + "" + "" + "
" + "

" + "This window is:
" + "300 pixels from left
300 pixels from " + " top
.

"); } // End -->



Home } Buttons } Window Position



Do you not where window.open() opens your new windows? Using this JavaScript, you can actually have the new window open wherever you want! Look at our example to see what we mean! Really neat!






The JavaScript Source: Buttons: Window Position

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as NotePad or SimpleText) and save (Control-s or Apple-s). The script is yours!

    

Did you use this script?  Do you like this site?  Please link to us!

Add a comment, suggestion, or correction
[For questions about usage, consult the Notes tab above or visit the JavaScript forum. Do not include more than two (2) lines of code in your comments. If you have suggestions or corrections, you can submit them to us.]

    
   
       
[optional]
 
[optional]

   

Comments feed Comment Feed RSS 2.0

Sign up for the Web Development Daily Newsletter

internet.com Privacy Policy
We'll send this script to you!

(just click "Send it!" once!)