[Greasemonkey] DOMParser and element attributes

chris feldmann cfeldmann at gmail.com
Thu Jul 14 00:35:59 EDT 2005


Thanks.
So the attributes are just transferred as is, huh? And so I was chasing my 
tail into chimeral labyrinths. Cool.

 
On 7/13/05, John <gm at plsek.id.au> wrote:
> 
> chris feldmann wrote:
> 
> >
> > /replyBlox.setAttribute('ordinal', googleSez.getElementsByTagName
> ('c').getAttribute('o'));/
> > /replyBlox.setAttribute('letters', googleSez.getElementsByTagName
> ('c').getAttribute('l'));/
> >
> Haven't really looked into what you are trying to achieve, however,
> getElementsByTagName in your example returns an array of all 'c' elements
> 
> so, you'd need to do something like
> 
> var replyBlox = googleSez.getElementsByTagName('c');
> for(i=0; i< replyBlox.length; i++)
> {
> replyBlox[i].setAttribute('ordinal',
> replyBlox[i].getAttribute('o'));
> replyBlox[i].setAttribute('letters',
> replyBlox[i].getAttribute('l'));
> }
> 
> John
> _______________________________________________
> Greasemonkey mailing list
> Greasemonkey at mozdev.org
> http://mozdev.org/mailman/listinfo/greasemonkey
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/greasemonkey/attachments/20050713/24d7975b/attachment.htm


More information about the Greasemonkey mailing list