Opening up new windows in the browser

wxdqz

New Member
I have a question about opening new pages when a link is clicked on a webpage. What I want to happen is this:


On the main webpage, I would like to have links to other websites. For example:

Link 1
Link 2
Link 3

Now, if I was to click links 1,2 and 3, I would have 4 browser windows open: The window containing the original webpage, plus the 3 windows that were opened by clicking on the 3 links. (I am using a href=http://www.webdeveloper.com/forum/archive/index.php/"www.,,,,," target="_blank"></A>)

Now, what I want to happen is this, I only want the mainpage to have ONE child window so that at any given time, there will be at most 2 browser windows open, the main page window and one child that is opened by clicking on a link. If I click on Link 1 followed immediately by Link 2, I don't want 2 child windows to pop up. What I need to happen is when I click Link 1, it needs to open a window. When I click link 2, the browser window that contains the webpage from link 1 now needs to show the webpage that from link 2. Is there a way to do this using javascript window.open?

Something like this would be best:
<A HREF=http://www.webdeveloper.com/forum/archive/index.php/"javascript:void(window.open('newlink.html'))">LINK</A>

I know this can be done simply buy using a targe like the following:
<a href=http://www.webdeveloper.com/forum/archive/index.php/"1.html" target="_mywindow">my link 1</a>,
<a href="1.html" target="_mywindow">my link 2</a>,
<a href="1.html" target="_mywindow">my link 3</a>,

Unfortunately I need a way to do this using javascript or code that can be coded directly in the HREF=" " section of code. Any suggestions?
 
Back
Top