Here''s some snippet code i use in my script: target.writeAttribute(''class'', '''').update(''''); if(Object.isString(this.opt.className)) target.addClassName(this.opt.className); then i use the following css rule; #target.opt_classname { font-size:20px;color:orange } FF and IE7 shows some nice orange text, IE6 on the other hand does nothing.. Here''s an example, http://roland.devarea.nl/dialog/#dialog_1, open dialog#1 in IE6 and you see the difference.. BUG? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Mar 31, 7:32 pm, Roland <franssen.rol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Here''s some snippet code i use in my script: > > target.writeAttribute(''class'', '''').update('''');I expect it is because you are not adding Prototype.js''s extra methods to the object that is target. Presumably it is a DOM object, so before the above line initialise target as: var target = $(this.content);> if(Object.isString(this.opt.className)) > target.addClassName(this.opt.className);Why test if opt''s className is a string - can it possibly be any other type? Consider just adding it, and since target either doesn''t have a className or you''ve changed it to an empty string, all three lines can be replaced by: target.className = this.opt.className; -- Rob --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I minified my code to what you said.. didnt solve the issue :P The solution is much easier.. IE6 doesnt understand this CSS rule; #id.class{} (no space) .class{} or #container .class{} even though this is much worser cause the classname can be applied to other elements too.. it solves my problem. When will IE6 stop existing? ^^ On 1 apr, 05:17, RobG <rg...-AFFH1GffN5hPR4JQBCEnsQ@public.gmane.org> wrote:> On Mar 31, 7:32 pm, Roland <franssen.rol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Here''s some snippet code i use in my script: > > > target.writeAttribute(''class'', '''').update(''''); > > I expect it is because you are not adding Prototype.js''s extra methods > to the object that is target. Presumably it is a DOM object, so > before the above line initialise target as: > > var target = $(this.content); > > > if(Object.isString(this.opt.className)) > > target.addClassName(this.opt.className); > > Why test if opt''s className is a string - can it possibly be any other > type? Consider just adding it, and since target either doesn''t have a > className or you''ve changed it to an empty string, all three lines can > be replaced by: > > target.className = this.opt.className; > > -- > Rob--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---