Reputation: 14280
I want to open a new window as a popup when user clicks a link and use it as the only popup window if user clicks the links again. I am not sure how to do it.
I have tried
window.open('test/'+id+'.html','','width=1017, height=689', true);
and tried adding different parameter in it but still not sure how to do this.
Can anyone help me about it? Thanks a lot
Upvotes: 0
Views: 67
Reputation: 5237
You can use window name as @Dagg suggested.
window.open('/test1', 'window_name', true);
Then, if you want to open another url in the same popup:
window.open('/test2', 'window_name', true);
Upvotes: 1