mukund
mukund

Reputation: 327

How to show the content in a new tab or window after clicking on a link

I have a link "help". Upon clicking the help link, the content has to be displayed in a new tab or in a new full window.If I am passing a link,say "google.com",the link is opened in a new tab but I am passing a htm file.So I'm getting the content in a pop-up. How can I avoid this and how can I get the content in new full window or tab? Could anyone help me in this? Thanks in advance.

My code:

var newtab=window.open();
newtab.location=a_pszHelpFile;

I also tried this:

var win=window.open(a_pszHelpFile, '_blank');
 win.focus();

Things which I tried:

window.onload = window.open(a_pszHelpFile, "__webCshStub", "width=1000,height=1000");


window.open(a_pszHelpFile, "__new", "width=1000,height=1000");

When I used this, a small window pops up.

 window.open(a_pszHelpFile, "_blank");

If I specify the width and height, this is what I get. enter image description here

How to get the content in a new tab?

Upvotes: 0

Views: 1945

Answers (1)

Jude Duran
Jude Duran

Reputation: 2205

I tried this without any properties (just the url) and it opened in a new tab

window.open(a_pszHelpFile);

See if this works for you too

Upvotes: 1

Related Questions