2

I am trying to open a link in new window, tried out some codes but they are displaying it in new tab . Any suggestions please...

<a href="https://www.google.co.in/" target="_blank" >Demo</a>    // this opens in  new tab

 <li onclick="window.open('https://www.google.co.in/')">Demo</li>  // this is also opening in new tab 

Thanks in Advance

anu
  • 458
  • 2
  • 13
  • 36

3 Answers3

2

try this one :

 <li onclick="window.open('http://publichealth.ecareagora.com','mywindow','height:auto;width:auto;')">Demo</li> 
daR
  • 250
  • 2
  • 19
0

Try like

<li onclick="window.open('http://www.google.com','mywindow','height:400;width:400;')">Demo</li> 
GautamD31
  • 28,552
  • 10
  • 64
  • 85
0

Use the following code i hope it solves your issue

Java Script

function MM_openBrWindow(theURL,winName,features) 
 { 
  window.open(theURL,winName,features);
  return false;
 }

In html button

onclick="MM_openBrWindow('help1.php','','width=750, height=650,left =530,
 top =230, location=no, menubar=no, status=yes,toolbar=yes,
  scrollbars=yes, resizable=yes')
Srini
  • 41
  • 1
  • 9