Hi,

But you are going to fix those invalid IDs, right?  Because they
*will* bite you, at some point.

-- T.J. :-)

On Oct 8, 6:43 pm, Lorenzo Decesare <lorenzo.deces...@gmail.com>
wrote:
> I have solved with:
>
> $$('#[id~="part1"] [id~="partF"]')
>
> Thanks.
>
> Lorenzo
>
> 2009/10/8 T.J. Crowder <t...@crowdersoftware.com>
>
>
>
>
>
> > Hi,
>
> > I'm afraid those IDs are invalid. IDs cannot contain spaces.[1]  Do
> > you mean to be uses classes, perhaps?
>
> > But leaving aside that issue, yes, $$ can do substring matches within
> > attributes using substring attribute selectors[2].  So for instance,
> > if you used underscores instead:
>
> > <div id='one_two_three'>alpha</div>
> > <div id='one_three'>beta</div>
> > <div id='three_one'>gamma</div>
> > <div id='three'>delta</div>
>
> > Then $$("[id*=three]") would match all four divs above.
>
> > HTH,
> > --
> > T.J. Crowder
> > Independent Software Consultant
> > tj / crowder software / com
> >www.crowdersoftware.com
>
> > [1]http://www.w3.org/TR/html401/types.html#type-name
> > [2]http://www.w3.org/TR/css3-selectors/#attribute-substrings
>
> > On Oct 8, 10:27 am, lodecesa <lorenzo.deces...@gmail.com> wrote:
> > > I have two strings 'part1' and 'partF'.
>
> > > I want to get the reference to the element that have the two strings
> > > in its id:
>
> > >   <input type="text" id="partA part1 part2 partD">
> > >   <input type="text" id="partB part1 part3 partE">
> > >   <input type="text" id="partC part1 part4 partF">
> > >   <input type="text" id="partD part1 part5 partG">
>
> > > I can use the $$ utility?
>
> > > Thanks.
> > > Lorenzo
--~--~---------~--~----~------------~-------~--~----~
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-scriptaculous@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