Hey there,
[EMAIL PROTECTED] a écrit :
> thanks everyone, i got it working under Firefox. however, it doesn't do
> anything in IE ( i am testing it under 6.0) . i am using Sonny's
> example.
>
>> <script type="text/javascript">
>> new Form.Element.EventObserver( 'id1',function(ele,value){
>> $('id2').innerHTML="test"; } );
>> </script>
Well, first, onChange is not always triggered at the same time,
depending on the browser. Some of those require that the component
loses focus. Try that.
Also, consider switching from ".innerHTML = x" to ".update(x)", which is
more portable.
Finally, if this doesn't cut it still, consider moving to a regular
Observer, which is time-based, with, say, a half-second period. This
will be slightly more resource-hungry, but ensures a value change is
detected quickly enough.
--
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---