-1

I know there's a lot of post about that, but none of them give me the right answer. Everything I tried always opens a new tab, but what I want is a new browser window, not just a tab.

Thank you.

elachere
  • 595
  • 2
  • 8
  • 20
  • 2
    Possible duplicate of [JavaScript open in a new window, not tab](http://stackoverflow.com/questions/726761/javascript-open-in-a-new-window-not-tab) – Szabolcs Páll Nov 12 '15 at 12:00

2 Answers2

0

This will help you. demo:http://jsfiddle.net/Pf8Rw/226/

HTML:

    <a href="#" class="open-popup">Click ton open new window</a>

JS

    $('.open-popup').click(function(e) {
    e.preventDefault();
    var OpenWindow= window.open(this.href, '_blank', 'width=300,height=200');
    var output = 'Hello, World! <p>Content in New window</p>';
   OpenWindow.document.write(output);
    });
ItzMe_Ezhil
  • 1,276
  • 2
  • 11
  • 22
0
<form action='playerView' method='get' target='_blank'>
        <button type='submit'>Start</button>
</form>

playerView is a requestHandler that just read and response the playerView html file :

function playerView(res) {
    console.log('playerView requestHandler called');
    fs.readFile('./views/playerView.html', 'utf8', function(err, data){ 
    res.writeHead(200, {'Content-Length' : data.length, 'Content-Type' : 'text/html'});
    res.write(data);
    res.end();
    });
}
elachere
  • 595
  • 2
  • 8
  • 20