# Javascript and rails?

**URL:** <https://www.ruby-forum.com/t/javascript-and-rails/90707>\
**Category:** Rails\
**Created:** [March 31, 2007, 8:39am UTC](https://www.ruby-forum.com/t/javascript-and-rails/90707 "2007-03-31T08:39:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lalala](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/eb8c5e/32.png) [@lalala](https://www.ruby-forum.com/u/lalala)\
**Post date:** [March 31, 2007, 8:39am UTC](https://www.ruby-forum.com/t/javascript-and-rails/90707/1 "2007-03-31T08:39:14Z")

</div>

Hi everyone  
I’m trying to learn ruby on rails and have some questions to ask about  
combining rails and javascript

Right now I’m in a situation where I’m have my ror app and another  
javasciprt library that I’m using.

In my rhtml file I embedded a javascript method using   
and have a button y that will call method\_x() when onClick

What I like to see is when 1 user click button y, the same event will  
happen to everybody who is viewing the page.

Thank you for reply
