I have a click handler for a specific link, inside that I want to do something similar to the following:
window.location = url
I need this to actually open the url in a new window though, how do I do this?
I have a click handler for a specific link, inside that I want to do something similar to the following:
window.location = url
I need this to actually open the url in a new window though, how do I do this?
You can like:
window.open('url', 'window name', 'window settings')
jQuery:
$('a#link_id').click(function(){
window.open('url', 'window name', 'window settings');
return false;
});
You could also set the target to _blank actually.
you will need to use window.open(url);
references:
http://www.htmlcodetutorial.com/linking/linking_famsupp_120.html
http://www.w3schools.com/jsref/met_win_open.asp