hmm, well, links[0] is returning a string, not the a object, so those
will both return null.

The question is why does this statement:
$$('.gallery .thumb .listItem .thumbHolder');
return the value of href (a string) and not that a object?

Thanks!

On Mar 20, 6:38 am, Richard Quadling <[email protected]> wrote:
> Almost certainly you are seeing the results of a toString() method
> kicking in for the objects (or similar).
>
> Try ...
>
> alert("links[0]:" + links[0].id + ':' + links[0].href);
>
> Richard Quadling.
>
> 2009/3/20 tkane2000 <[email protected]>:
>
>
>
>
>
> > How come the $$() function returns the value of the href when
> > selecting an anchor tag instead of the tag itself?  ...I've had mixed
> > results for this btwn FF and IE6, but it's consistant in the code
> > below.  Anyone know what I'm doing wrong here or if there's a
> > workaround?
>
> > <div id="gallery">
> >        <div class="thumb">
> >                <div class="listItem">
> >                        <a href="/asdfasdf/asdfsdf.jhtml" 
> > class="thumbHolder">this is some
> > text</a><br />
> >                        <a href="/asdfasdf/asdfsdf.jhtml" 
> > class="thumbHolder">this is some
> > text</a><br />
> >                </div>
> >        </div><br />
> >        <div class="thumb">
> >                <div class="listItem">
> >                        <a href="/asdfasdf/234234.jhtml" 
> > class="thumbHolder">this is some
> > text 21</a><br />
> >                        <a href="/asdfasdf/234234.jhtml" 
> > class="thumbHolder">this is some
> > text 23</a><br />
> >                </div>
> >        </div>
> > </div>
>
> > <script type="text/javascript">
> >        var links = $$('.gallery .thumb .listItem .thumbHolder');
> >        alert("links[0]:" + links[0]);
> > </script>
>
> --
> -----
> Richard Quadling
> Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498&r=213474731
> "Standing on the shoulders of some very clever giants!"
--~--~---------~--~----~------------~-------~--~----~
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