After some more digging, I found a way the syntax to changing the
value of an input element in Rails RJS. Instead of using
page.replace_html, I have to do it like this page[:field_id].value
= .... This is cool stuff, but it does mean that you need to
understand prototype.js functions which is technically part of Rails.
Thanks everyone.
On Jul 9, 11:39 am, bngu <[EMAIL PROTECTED]> wrote:
> Thanks Ken. Is there an easy way to do that in rails? I assume that
> the syntax is page.replace_html but perhaps not
>
> On Jul 9, 10:16 am, Ken Snyder <[EMAIL PROTECTED]> wrote:
>
> > bngu wrote:
> > > Digging in further, this appears to be a bug with prototype.js for
> > > html input element type. If I switch field4 to textarea type, it works
> > > fine, anyone came across this problem?
>
> > Element.update() uses innerHTML. To change the value of an input field,
> > use $('field').value = 'new value';
>
> > -- Ken Snyder
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---