javascript open window references

Posted by duckofrubber on Stack Overflow See other posts from Stack Overflow or by duckofrubber
Published on 2010-03-22T15:53:45Z Indexed on 2010/03/22 16:41 UTC
Read the original article Hit count: 297

Filed under:
|
|

Hi,

I'm having some issues understanding how to reference new browser windows after opening them. As an example, if I created 3 new windows from a main one (index.html):

    var one = window.open( 'one.html', 'one',"top=10,left=10,width=100,height=100,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no");

    var two = window.open( 'two.html', 'two',"top=100,left=10,width=100,height=100,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no");

    var three = window.open( 'three.html', 'three',"top=200,left=10,width=100,height=100,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no");
    two.focus();

How could I programmatically focus on (or just refer to) browser "three" if browser "two" is currently in focus?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about window