opening new page in same window
-
Hello all I'm trying to open a new page by using window object. when I say window.open(page), it's opening in a new window. I would like to open the page in the same window. I'm using javascript. If any one know's how to do it,pls help me. thanks for your help. Hari.
-
Hello all I'm trying to open a new page by using window object. when I say window.open(page), it's opening in a new window. I would like to open the page in the same window. I'm using javascript. If any one know's how to do it,pls help me. thanks for your help. Hari.
mywin = window.open(...) mywin.focus()
-
Hello all I'm trying to open a new page by using window object. when I say window.open(page), it's opening in a new window. I would like to open the page in the same window. I'm using javascript. If any one know's how to do it,pls help me. thanks for your help. Hari.
Give the window a name, eg.
var myWin = open(pape, 'MyWindow');
. Later, when the main document hasn't changed, you can use the window object to open a new page (if(myWin && !myWin.closed) myWin.localtion.href = 'foo.html';
); form a different page, using open with the same name (MyWindow) will load the url into the same window.