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
Post a Comment