Your code is correct, but missing after width concatenation:
width='+w',
it should be
width='+ w +',
I tried this, maybe I donโt understand, I want you to really want:
var h = screen.height; var w = screen.width; $('#window-opener').live('click',function (e) { window.open(this.href, 'Resource', 'toolbar=no ,location=0, status=no,titlebar=no,menubar=no,width='+w +',height=' +h); e.preventDefault(); });โ
Fiddle: http://jsfiddle.net/UC8Ww/
source share