Hello,
I am using the following javascript code to open a new window.
Somehow, IE always opens a new window. It doesn't open target url in
the window name given.
All i want is, if there is a window "MyWin" already open, then the
main window should load the target url in "MyWin" and not open a new
window again.
<!-- Code Starts -->
<html><head></head>
<Script Language="javas cript">
function Callme()
{
var win2 = window.open("Te st2.htm", "MyWin");
}
/* I don't want to use following type of code as it serves the purpose
initially but not if you refresh the main page.*/
/*
function Callme(location ){
var win2;
if (typeof win2 == "object") {
win2.location.r eplace(location );
}
else{
win2=window.ope n(location,"MyW in",null,true );
}
}
// thanks
*/
</Script>
<body>
<form>
<input type="button" value="Click Me" onClick="Callme ();">
</form>
</body>
</html>
<!-- Code Ends -->
Any hint/help apprreciated.
IE version : 6.0.2800.1106.x psp2.030422-1633
OS : Windows XP
Thanks,
Samir
I am using the following javascript code to open a new window.
Somehow, IE always opens a new window. It doesn't open target url in
the window name given.
All i want is, if there is a window "MyWin" already open, then the
main window should load the target url in "MyWin" and not open a new
window again.
<!-- Code Starts -->
<html><head></head>
<Script Language="javas cript">
function Callme()
{
var win2 = window.open("Te st2.htm", "MyWin");
}
/* I don't want to use following type of code as it serves the purpose
initially but not if you refresh the main page.*/
/*
function Callme(location ){
var win2;
if (typeof win2 == "object") {
win2.location.r eplace(location );
}
else{
win2=window.ope n(location,"MyW in",null,true );
}
}
// thanks
*/
</Script>
<body>
<form>
<input type="button" value="Click Me" onClick="Callme ();">
</form>
</body>
</html>
<!-- Code Ends -->
Any hint/help apprreciated.
IE version : 6.0.2800.1106.x psp2.030422-1633
OS : Windows XP
Thanks,
Samir
Comment