How do I ‘name’ a browser window in ROR, such that I can open a page in it later, from another (popup) window (using the target=’name’ html parameter)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to use JavaScript for this:
Of course you could easily package this up into a Rails helper method. For example, in
app/helpers/application_helper.rbadd a new method:Next, in your layout file, add this line somewhere within the HTML
<head>element:Finally, in your view templates, simply add a line like this (can be anywhere you want) to output the correct JavaScript: