Thanks, that did the trick!

2009/11/24 RodMcguire <[email protected]>:
> WRONG:
>  document.body.insertBefore(logo, Thissummary);
>
> RIGHT:
>  Thissummary.parentNode.insertBefore(logo, Thissummary);
>
> On Nov 24, 6:58 am, Gids <[email protected]> wrote:
>> Hi,
>>
>> I am writing a greasemonkey script to insert extra content into
>> radiotimes.com TV listings like this 
>> example:http://www.radiotimes.com/ListingsServlet?event=10&channelId=92&progr...
>>
>> However, I am having a problem returning a node which I want to
>> InsertBefore using getElementsByClassName
>>
>> Here's what I am doing at the moment:
>> var summary = document.getElementsByClassName('summary');
>> var Thissummary = (summary[0]);
>>
>> This returns: [object XPCNativeWrapper [object HTMLHeadingElement]]
>>
>> Then later on I call:
>> document.body.insertBefore(logo, Thissummary);
>> however, this fails with 'Node was not found'
>>
>> How can I change my script to return a node, or is there a better way
>> altogether to do this?
>>
>> Thanks in advance,
>>
>> Gids
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "greasemonkey-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/greasemonkey-users?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/greasemonkey-users?hl=en.


Reply via email to