Hello there!
I have used the window.open function and it work fine, but what I would like to happen is when I click on another link, it first closes the open window before opening the new one?
Here is part of the script I am using at the moment, and hope that I can just add a new line into it?
<!--
function my_win()
{
window.open('design.htm','mywindow','width=250,height=300,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
}
function my_win2()
{
window.open('domain.htm','mywindow','width=250,height=300,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
}
//-->
Then the links are:
<a href="javascript:my_win()">link</a>
<a href="javascript:my_win2()"Link2</a>
And the link in the open window is:
<a href='javascript: window.close();'>Close Window</a>
I was hoping that I could just add window.close() to the open window link but unfortunatly not.
Thanks in advance if any one can help
I have used the window.open function and it work fine, but what I would like to happen is when I click on another link, it first closes the open window before opening the new one?
Here is part of the script I am using at the moment, and hope that I can just add a new line into it?
<!--
function my_win()
{
window.open('design.htm','mywindow','width=250,height=300,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
}
function my_win2()
{
window.open('domain.htm','mywindow','width=250,height=300,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no');
}
//-->
Then the links are:
<a href="javascript:my_win()">link</a>
<a href="javascript:my_win2()"Link2</a>
And the link in the open window is:
<a href='javascript: window.close();'>Close Window</a>
I was hoping that I could just add window.close() to the open window link but unfortunatly not.
Thanks in advance if any one can help