Sounds like this could be an enhancement request: have Ajax.Update  
detect if the passed element is an input, and if so, update the value  
rather than the innerHTML.

Does a core dev want to sound off on whether a patch to that effect  
would be implemented?


TAG

On Jul 9, 2007, at 12:39 PM, bngu 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to