On Sep 1, 6:54 pm, Richard Quadling <rquadl...@gmail.com> wrote:
> On 31 August 2010 20:16, kstubs <kst...@gmail.com> wrote:
>
>
>
> > I notice that if I intend to add class to an element that I must use
> > className and not class for my object.  But what if I intend to name
> > my element?  What do you use then?  For example:
>
> > { className : "foo", innerHTML : "bar" }
>
> > On a newly defined TD yields:
> > <td class="foo">bar</td>
>
> > But if the object is:
> > { name="somename", className : "foo", innerHTML : " }
> > The attribute name *does not appear* on my new TD element.
> > Originally, I was doing this:
>
> > { class : "foo", innerHTML : "bar" }
>
> > And was never getting class on my TD object.  So how do you know which
> > names to use in order to get the result on the element you desire?
[...]
> As I understand things, Prototype's Object.extend, when related to
> elements, is using the DOM names and not the HTML names.

Object.extend simply copies properties from one object to another,
that's it. So if you use it to add properties to DOM elements, use DOM
property names, not HTML attribute names.


> They are different. You have to learn them, sorry.
>
> name is an attribute on <form> elements (input, select, textarea,
> buttons, etc. - is there an etc. ? ).

Yes, such as applet, frame, iframe, a and so on. Specifications are
handy documents.

<URL: http://www.w3.org/TR/html401/index/attributes.html >


> There are many online references. I like the SitePoint 
> oneshttp://reference.sitepoint.com/css,http://reference.sitepoint.com/html,http://reference.sitepoint.com/javascript.

The definitive reference is the appropriate W3C document.


--
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 prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to