Thats it!  Thank you T.J.

On Aug 25, 12:50 pm, "T.J. Crowder" <[email protected]> wrote:
> @Rick: Not that strange, see below. :-)
>
> @kstubbs: You haven't mentioned what your doctype is, but that's
> invalid markup in HTML at least (I don't know whether it's valid
> XHTML; the validator[1] seems to accept it as XHTML). You can't self-
> close a div tag (because it's a "non-void" element), which basically
> means you'll get whatever the browser decides to do with it. If you
> change your markup to
>
> <div id="OUT">
>     <div class="out out1"></div>
>     <div class="out out2"></div>
>     <div class="out out3"></div>
>     <div class="out out4"></div>
> </div>
>
> ...the markup is valid and you get the result you expect (just checked
> -- both failure and success -- with Chrome). Even if I change my
> DOCTYPE to XHTML and load the page as a file (not through a server
> that might be -- probably *would* be -- giving the wrong mime type for
> it), Chrome still treats it as invalid and munges all of those divs
> together. Firefox treats it slightly differently, treating each tag as
> just the *opening* tag, so they're all nested.
>
> When dealing with issues like this, it's helpful sometimes to use
> Firebug (in Firefox) or Dev Tools (in Chrome) to look at the DOM that
> resulted from parsing your markup. And of course, the validator[1] is
> handy. :-)
>
> [1]http://validator.w3.org
>
> HTH,
> --
> T.J. Crowder
> Independent Software Consultant
> tj / crowder software / comwww.crowdersoftware.com
>
> On Aug 25, 7:01 pm, Rick.Wellman <[email protected]> wrote:
>
>
>
> > This is weird... when FF renders this HTML for me it is putting the divs
> > inside each other like the following.  I have never seen this behavior
> > before (but explains why the code is working like it is):
> >         <div id="OUT">
> >             <div class="out out1">
> >                 <div class="out out2">
> >                         ...
> >                         </div>
> >                 </div>
> >         </div>    
>
> > -----Original Message-----
> > From: [email protected]
>
> > [mailto:[email protected]] On Behalf Of kstubs
> > Sent: Wednesday, August 25, 2010 12:48 PM
> > To: Prototype & script.aculo.us
> > Subject: [Proto-Scripty] invoke method update
>
> > I'd expect all div.out containers to be updated with the value
> > "testing", but just getting the first one.  What is wrong with the
> > following code?
>
> > Expected:
> > testing
> > testing
> > testing
> > testing
>
> > Actual:
> > testing
>
> > The code:
> >         <ul>
> >             <li><button onclick="$
> > ('OUT').select('div.out').invoke('update','testing');">Test</button></
> > li>
> >         </ul>
> >         <div id="OUT">
> >             <div class="out out1"/>
> >             <div class="out out2"/>
> >             <div class="out out3"/>
> >             <div class="out out4"/>
> >         </div>
>
> > --
> > 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 
> > athttp://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
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.

Reply via email to