On 17 Mar., 11:18, Sudhi Kulkarni <rails-mailing-l...@andreas-s.net>
wrote:
> ruby...@ymail.com wrote:
> > On 17 Mar., 07:02, Sudhi Kulkarni <rails-mailing-l...@andreas-s.net>
> > wrote:
> Hi David,
>
> I tried this but it does not work. For the text area update to work with
> IE for a single line I had to do
>
>     link_to_function name do |page|
>         page[:text_area].value = "Hello world"
>     end
>
> Please note the .value that I use, without using .value it does not work
> ... so for appending I tried
>
> page[:text_area].value << "This is new line"
>
> This also did not work. Need further help...

page[:text_area].insert_html :bottom, "The new line"

This should work properly. The documentation for the methods available
in RJS is located here, if you want to take a closer look:
http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator/GeneratorMethods.html

--
Cheers,
David Knorr
http://twitter.com/rubyguy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to