views:

44

answers:

1

Using the Twitter API, and just want to have a simple 'reply' button on every tweet (say, 'How do I create a reply button?' from @kraykray) that automatically puts '@kraykray' into the tweet form. Don't need the system to log that it's any kind of special message.

A: 

you can do this with the help of rails javascript helpers or you can use only javascript to handle this problem as well.

Rails way On clicking the reply button call some action and pass the username as params to the action and render your textarea with the username as value for the textarea. Hope this helps

Please let me know if you need code snippets.You can improve the code, I am just trying to explain how you can do with javascript. I dint used jquery or prototype because, I donno which library you use.

Please check this link http://jsbin.com/atodu3/2

Vamsi
Some code snippets would be great!
kateray
Please check this link http://jsbin.com/atodu3/2and you can play around with the code snippet here Please check this link http://jsbin.com/atodu3/2/edit
Vamsi