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

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -