new windows

  You are currently not logged in. You can view the forums, but cannot post messages. Log In | Register

10-Mar-00 02:36
I know how to open a new window using JavaScript, but I was wondering if you could open two using only one link (or button). Is it possible, and does anyone know how?
18-Mar-00 13:16
Hi there,

To do this, just use the window.open method twice, with different window names and URL's.

Working from the example in our "Opening Windows" JavaScript tutorial, you could do something like this:


function openTwoWindows()
{
NewWindow1=window.open('boo1.html', 'boo1',
'width=180,height=50');
NewWindow2=window.open('boo2.html', 'boo2',
'width=180,height=50');

}


then call it as normal with:

Click <a href="javascript:openTwoWindows()">here</a>

That should do it! Hope that helps.

Best wishes,
Matt




--
Matt Doyle, Elated
3rd Edition of my jQuery Mobile book out now! Learn to build mobile web apps. Free sample chapter: http://store.elated.com/

 
New posts
Old posts

Follow Elated