When I use the setStyle method and set the value of an element the text shows as the original color then changes to the new color. It happens quickly, of course, but it blinks and is not aesthetically pleasing. Here is the code that cause the blink: el.setStyle({color: ''#c9c4e1''}); el.value = lTip; This code works great: el.style.color = ''#c9c4e1''; el.value = lTip; el is an input field. The original color of the input field is black. And I tried combining the two statements into one, and it still blinks. Dennis --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
My mistake. It looks like it blinks either way. Maybe its a problem with the way FF renders the graphics. Dennis On Jan 3, 7:20 pm, Dennis <djhanso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> When I use the setStyle method and set the value of an element the > text shows as the original color then changes to the new color. It > happens quickly, of course, but it blinks and is not aesthetically > pleasing. > > Here is the code that cause the blink: > > el.setStyle({color: ''#c9c4e1''}); > el.value = lTip; > > This code works great: > > el.style.color = ''#c9c4e1''; > el.value = lTip; > > el is an input field. The original color of the input field is > black. And I tried combining the two statements into one, and it > still blinks. > > Dennis--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Alternately you could define a css class: .moo { color:#c9c4e1 } ...then use el.addClassName(''moo'') On Jan 3, 10:39 pm, Dennis <djhanso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> My mistake. It looks like it blinks either way. Maybe its a problem > with the way FF renders the graphics. > > Dennis > > On Jan 3, 7:20 pm, Dennis <djhanso...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > When I use the setStyle method and set the value of an element the > > text shows as the original color then changes to the new color. It > > happens quickly, of course, but it blinks and is not aesthetically > > pleasing. > > > Here is the code that cause the blink: > > > el.setStyle({color: ''#c9c4e1''}); > > el.value = lTip; > > > This code works great: > > > el.style.color = ''#c9c4e1''; > > el.value = lTip; > > > el is an input field. The original color of the input field is > > black. And I tried combining the two statements into one, and it > > still blinks. > > > Dennis--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---