well i figured thats what the selectors are for

am suprised no one mentioned it eairler as i have seen this thread goon for
a while now 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of gabriel munteanu
Sent: Tuesday, 16 December 2008 1:06 AM
To: [email protected]
Subject: Re: selecting a FONT tag with a COLOR property


font[color$=a0a0a0] worked, thanks Steve.
though i will try the more general approach for other bad html as Michal
said.

thank you all again
jgabios

On Mon, Dec 15, 2008 at 1:16 PM, Steve Onnis <[email protected]> wrote:
>
> cant you use
>
> font[color$=a0a0a0]
>
> Steve
>
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Michal
> Sent: Monday, 15 December 2008 10:04 PM
> To: MooTools Users
> Subject: Re: selecting a FONT tag with a COLOR property
>
>
> I have also just found
> http://mootools.lighthouseapp.com/projects/2706/tickets/226
> : having "#" in a selector appears to result in a known bug.
>
> Michal.
>
> On Dec 15, 10:38 am, Michal <[email protected]> wrote:
>> I think the "standards mode" requirement is only on some parts of
>> MooTools. For example
> Accordianhttp://www.w3.org/TR/html401/types.html#type-color
>> (so I just always use standards mode just to be sure).
>>
>> Regarding another library, I don't actually have any experience of any
>> other library, so someone else should maybe answer... I hear jQuery is
>> popular though.
>>
>> For the I have thought of a workaround, using the 'filter' function:
>>
>> var fontElements = $$("font").filter(function(el) {
>>   return (el.getProperty('color').test('#a0a0a0'));});
>>
>> alert($$(fontElements));
>>
>> It's not that neat, but it seems to work.
>>
>> Michal.
>>
>> On Dec 15, 9:53 am, "gabriel munteanu" <[email protected]> wrote:
>>
>> > hi, i am using mootools here on html pages that another program finds
>> > on the net.
>> > i have no control over the html source. i take it as it comes.
>> > @Michal: i could find more bad html pages, and mootools could not help
>> > me there. do you know any other js library that is more "loose" ?
>> > one that can select nodes even on bad html?
>>
>> > thanks in advance
>> > jgabios
>>
>> > On Sat, Dec 13, 2008 at 4:44 PM, rpflo <[email protected]> wrote:
>>
>> > > I'm with Michal.
>>
>> > > Why not add a css class to the elements you wan "tobeselected" and
>> > > that class has the font color you want?  Then it's easy and current:
>>
>> > > <span class="someClass">tobeselected</span>
>>
>> > > alert($$('.someClass'))
>>
>> > > On Dec 13, 7:37 am, Michal <[email protected]> wrote:
>> > >> Hi,
>>
>> > >> I think there is an issue with "#" in the attribute selector. If you
>> > >> remove the "#" in the font color attribute, then it seems to work
> fine
>> > >> (at least in Safari). This might be a bug, I'm not sure.
>>
>> > >> *However* there are a number of issues that I would just like to
>> > >> mention
>>
>> > >> - Font tag is deprecated, and I think really shouldn't be used
>> > >> nowadays (but maybe if you're working with some legacy site...)
>> > >> - Even though the script is at the bottom of the body tab, maybe it
>> > >> should be encompassed in a 'domready' listener? I'm never sure
> exactly
>> > >> when it is ok to be accessing the DOM before that event fires.
>> > >> - I imagine these things are omitted as it is a quick test page, but
>> > >> some things in MooTools do require the page to be in standards mode,
>> > >> so it would need a DOCTYPE, and I also notice that the bottom
> "script"
>> > >> tag doesn't have an explicit type, which might throw some
> browsers...?
>> > >> I'm not too sure.
>>
>> > >> Michal.
>>
>> > >> On Dec 13, 2:00 pm, "gabriel munteanu" <[email protected]> wrote:
>>
>> > >> > hi, i have setup an example
> here:http://www.e-forum.ro/mootoolex/example.html
>> > >> > what i want, is to show the text "tobeselected" from inside the
> font
>> > >> > tag with alert().
>> > >> > i tried font[color=#a0a0a0] , font[color=#a0a0a0] ,
> font[color=a0a0a0]
>> > >> > , nothing works.
>> > >> > can someone please help me on this one?
>>
>> > >> > thanks in advance
>> > >> > jgabios
>
>

Reply via email to