javascript - variable at end of string -
i'm trying open popup window on left upper corner of current window. far y positioning works fine, can't x work. how syntax right?
function openpopup() { var url = this.href; window.open(url, 'popup_id', 'scrollbars, resizable, width=400, height=300, top='+ window.screeny,'left='+ window.screenx''); return false; }
you forgot second +
window.open(url, 'popup_id', 'scrollbars, resizable, width=400, height=300, top='+ window.screeny +', left='+ window.screenx);
Comments
Post a Comment