Hi Ron,
It works !
just a minor glimpse: to get access (read/write) to the
frame content I've to use unsafeWindow [1] instead of window
and document instead of contentDocument:
unsafeWindow.frames['Enquete'].document.getElementById("SpanId");
thank you so much, I owe a beer :)
andrea
[1] http://greasemonkey.mozdev.org/authoring.html#unsafeWindow
On Fri, Aug 22, 2008 at 10:55 PM, RodMcguire <[EMAIL PROTECTED]> wrote:
>
>
>
> On Aug 21, 11:05 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>> the code above do work if executed in a normal javascript console, on the
>> other hand it doesn't in a GM env... after a little searching and reading
>> ...
>> Am I missing something obvious ?
>
> Maybe your problem is that just because you have a frame/iframe that
> doesn't mean that its content is loaded. (running from the js-shell
> usually gives the doc enough time to fully load the frame).
>
> If that is the case you need to wait for events like [1]
> DOMFrameContentLoaded
>
> I gotta run so I can be more specific now but I think I often do
> things like
>
> iframe.addEventListener('load', myLoadFun, false);
>
> and access the content via
> iframe.contentDocument
>
> [1] http://developer.mozilla.org/en/Gecko-Specific_DOM_Events
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---