how do you call a url in javascript or var codes -


i have little script written displays photo , clickable url on screen when filename called, automatically have url open in new window after filename inputted or called on screen. can help? code calling of file(inside setup window on screen) below.

 var io = { "filename" : "<br />filename <br />----------------------------------<br />some text here.<br /><br /><img src='http://myurl.com/aphoto.jpg' /><br /><a href='http://myurl.com/afile.html' target='_blank'>http://myurl.com/afile.html</a><br /><br />", "help": "<br /><br />available commands:<br />1. filename<br />", };   

create variable or function can url. then, can execute window.open(urlvariable)

var link = "http://google.com"; var newwindow = window.open(link); 

window.open() has other parameters can passed: https://developer.mozilla.org/en-us/docs/web/api/window/open


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -