I am working on a website, in which I have to open a url from backend. I am using c# now. My problem is that I want to open link in new tab instead of new window.
M
Have you try this code: Originally shared here
function OpenInNewTab(url )
{
var win=window.open(url, '_blank');
win.focus();
}
In most cases, this should happen directly in the onclick
handler for the link to prevent pop-up blockers and the default "new window" behavior. You could do it this way or by adding an event listener to your DOM
object.
Something To Click On
Please also try this:
Add your form name attribute like:
and then try it like that:
Submit
and check this link http://jsfiddle.net/ef69K/