Here is my code:
in the .jsp file:
<a target="NEWWINDOW"
href="javascript
:formNewWindow('<%=ers.getURL()%>' )"
class="sbLinkBlue">View Detail</a>
in newWindow.js file
function formNewWindow(url)
{
var windowName ='NEWWINDOW';
window.open(url,windowName);
}
Every time View Detail is clicked on the same page or different pages,
a new window is created. The link always begins with https. I tested
the above with http and it works fine.
Jon
Lasse Reichstein Nielsen <lr*@hotpop.com> wrote in message news:<is**********@hotpop.com>...
ca*********@hotmail.com (Kien) writes:
jo*@jkworld.com (Jon) wrote in message news:<90*************************@posting.google.c om>...
I have links that open https secondary windows using:
window.open(url, windowName);
The windowName is always the same but I keep getting new windows. Is
it possible for each of the links to open in the same window?
They should. Can you show us the page that fails?
[top post fixed]
window.open() will always open new ones.
Not if the windowName is the same, and is a valid window name.
Try windowName.location=url
That will rarely work. If "windowName" is the name of the window that
is opened, it doesn't become a global variable. If it is the name of a
sub-frame, it will only be a global variable in some browsers.
If you man to write
var windowName = window.open(...)
and then
windowName.location = url
then it will probably work (if window.open does :)
/L