[Greasemonkey] modify a javascript array
Tobias Orterer
orterer at gmail.com
Tue Jul 5 06:48:15 EDT 2005
ok, now its driving me crazy...
if( bar > 0 ) span[i].firstChild.nodeValue += 'B:' + bar;
if( ( bar> 0 ) && ( foo> 0 ) ) {
span[i].appendChild( document.createElement( "br" ) );
}
if( foo > 0 ) span[i].firstChild.nodeValue += 'F:' + foo;
why is the <br> not between the text?!?
sorry, i am shure getting on someones nerves...
On 7/5/05, Tobias Orterer <orterer at gmail.com> wrote:
> var span, title;
> span = document.getElementsByTagName('span');
> for( i = 0; i < span.length; i++ ) {
> if( span[i].attributes['title'] ) {
> title = span[i].attributes['title'].nodeValue;
> span[i].firstChild.nodeValue += '<br>' + title;
> }
> }
>
> ;)
>
> sorry... i'am new with this...
>
> btw. why is the <br> in plaintext in the page?
> its not parsed as a <br>...
>
>
> On 7/5/05, John <gm at plsek.id.au> wrote:
> > Tobias Orterer wrote:
> >
> > >has anyone a solution?
> > >
> > >thx!
> > >
> > >
> > >
> > >
> > >
> >
> > var b = "<span>" + a[i][0] + a[i][2] + a[i][1]+ "</span>";
> >
> > John
> >
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
>
>
> --
> PGP: 1D87 2E28 B3A5 EEAE 19EB 01C1 ED45 5B31 39AA 1669
> X-Face: #tKg=zl at ll)/&Fk7:KT,[a*VyTHbwl.(=kO_u_T~-8:YDVcz9FGO74R=I32L'#)-ynM8lwc
> B;r,W=&vOx;x#:p-kaIa)LwWLsh.j8"+&n4l:GJMU<i|'lQ9XT>J%pfO$yS+pwag_'Ce/~Zc^&ShSv
> mLp\Ngd&t`r\&VQ'
>
--
PGP: 1D87 2E28 B3A5 EEAE 19EB 01C1 ED45 5B31 39AA 1669
X-Face: #tKg=zl at ll)/&Fk7:KT,[a*VyTHbwl.(=kO_u_T~-8:YDVcz9FGO74R=I32L'#)-ynM8lwc
B;r,W=&vOx;x#:p-kaIa)LwWLsh.j8"+&n4l:GJMU<i|'lQ9XT>J%pfO$yS+pwag_'Ce/~Zc^&ShSv
mLp\Ngd&t`r\&VQ'
More information about the Greasemonkey
mailing list