Rob, Please have a look at the DOM specs.
The only area where you should not be using writeAttribute is: - When you want to store anything but a string (use the new storage API or expandos directly). - For setting or getting the value attribute of Form elements (use FormElement#(get|set)Value instead). Best, Tobie On Mar 5, 3:53 am, RobG <[email protected]> wrote: > On Mar 5, 7:32 am, Lee Jenkins <[email protected]> wrote: > > > Are there any known problems with writeAttribtue and FF3? I have a small > > function: > > > function(obj){ > > Element.writeAttribute(obj.elname, obj.attr, obj.newValue); > > > } > > > It doesn't update the attribute. > > How did you determine that? Do you have a test case? > > > I also tried with literal values instead of > > using the object's properties as params. Setting the value using dot > > notation > > works however and both the dot notation and writeAttribute works on IE7. > > Don't use writeAttribute for attributes defined in HTML 4 for DOM > elements where setting the dot property does the job. writeAttribute > uses setAttribute which has known differences between browsers (e.g. > when working with form controls, using setAttribute to set the value > attribute will only change the value in IE, Firefox changes both the > value and the defaultValue). > > setAttribute is intended to be a general way to set the value of > attributes, not properties. While it works more or less > interchangeably with the dot property 99% of the time, the few foibles > mean that it's safter to only use it for setting attributes that > aren't standard HTML 4 attributes (and use the dot property for > everything else). > > -- > Rob --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
