Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open link in new window - coffescript

Tags:

coffeescript

How to get beahviour similar to HTML's target='_blank' inside coffeescript?

so far I have tried:

window.location = "/site/#{pk}/goto_url/"
window.attr('target', '_blank')
like image 609
andilabs Avatar asked Mar 19 '23 20:03

andilabs


1 Answers

You should try

window.open "/site/#{pk}/goto_url/", "_blank"
like image 161
David Frank Avatar answered Apr 05 '23 23:04

David Frank