derekstattin
asked on
Using a toggle/open sindow button
I have some code to open a new window that is in page A.
<a href="" class="login" onclick="javascript: secondwindow =open('http://www.site.com/login.php','login','height=900, width=900, scrollbars=yes,resizable=y es,top=100 ,left=100, screenx=10 0,screeny= 100,addres sbar=1,too lbar=1,sta tusbar=1,m enubar=1') ">-login-< /a>
1.When the user opens the new window, Page B, using the link above,
2. Then goes back to page A,
3. Then clicks the link in page A(ie the link above again), I would like the link to "toggle", rather than try to open a window that is already open.
Just using the code above, the second window stays behind the first.
Do I just need to use a toggle, or a combination of open window and toggle, where javascript recognizes if the window B is already open? Can you help me modify the code above?
<a href="" class="login" onclick="javascript: secondwindow =open('http://www.site.com/login.php','login','height=900, width=900, scrollbars=yes,resizable=y
1.When the user opens the new window, Page B, using the link above,
2. Then goes back to page A,
3. Then clicks the link in page A(ie the link above again), I would like the link to "toggle", rather than try to open a window that is already open.
Just using the code above, the second window stays behind the first.
Do I just need to use a toggle, or a combination of open window and toggle, where javascript recognizes if the window B is already open? Can you help me modify the code above?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.