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
