Hi, Experts,
Due to the length limitation on the subject line, I have to cut it short. My actual question is
How to open a new window at the designated target window with different features?
Here is the detail:
A web page (on parent window) has two links. If you click link 1, you'll get a new child window with a fixed target name. And this child window has its feature set to toolbar=no,menubar=no. -- I know how to do this.
If you click link 2, by design, it should open a new window on the same target with its feature set to toolbar=yes,menubar=yes. -- This is the one I do not know how to implement.
Here is the piece of my code:
If my implementation is like case 1, then the new window has a different target, even if I explicitly set the target as 'dummy'. But this new window does have toolbar and menubar as expected.
If my implementation is like case 2, then the new window does go to the same target as expected. However, it does not have toolbar and menubar.
Can someone help me on this? I have been struggling for hours and could not make it work.
Many thanks in advance!
Due to the length limitation on the subject line, I have to cut it short. My actual question is
How to open a new window at the designated target window with different features?
Here is the detail:
A web page (on parent window) has two links. If you click link 1, you'll get a new child window with a fixed target name. And this child window has its feature set to toolbar=no,menubar=no. -- I know how to do this.
If you click link 2, by design, it should open a new window on the same target with its feature set to toolbar=yes,menubar=yes. -- This is the one I do not know how to implement.
Here is the piece of my code:
Code:
function myOpenPage(link,page) {
if(link == 1) { // just an example
window.open(page,'dummy','toolbar=no,menubar=no');
}
else if(link == 2) {
window.open(page,'dummy','toolbar=yes,menubar=yes'); //case 1
//window.open(page,'dummy'); // case 2
}
}
If my implementation is like case 1, then the new window has a different target, even if I explicitly set the target as 'dummy'. But this new window does have toolbar and menubar as expected.
If my implementation is like case 2, then the new window does go to the same target as expected. However, it does not have toolbar and menubar.
Can someone help me on this? I have been struggling for hours and could not make it work.
Many thanks in advance!