On Tue, Jan 20, 2009 at 9:42 PM, Justin McConnell <[email protected]> wrote:
>var e = window.frames["myframe"].event;

>
> assuming <iframe name="myframe"> somewhere in your HTML.
>
>
Yes, that would bi fine if I had my own page. But on iGoogle page where I
would place my gadget, I don't have that luxury or do I?




On Tue, Jan 20, 2009 at 9:42 PM, Justin McConnell <[email protected]> wrote:

>
> On Jan 19, 10:15 am, JGrenivka <[email protected]> wrote:
> > Hi
> >
> >   My question is really simple. In IE error handling I try to access
> > information about the source of the event. Yet srcElement comes up
> > undefined. In FF e.target works fine. How can I find out the source of
> > the event in IE within iFrame?
>
> You will need to access the window object for the iframe that is the
> source of the event.  Grabbing the event property might only work on
> iframes with your own pages though -- because of the same origin
> policy in browsers.
>
> >
> > I use standard javascript code, that works just fine on a normal HTML
> > page:
> >
> > function anError(e)
> > {
> > var el;
> > if (!e)
> >   {
> >   var e=window.event;
>
> var e = window.frames["myframe"].event;
>
> assuming <iframe name="myframe"> somewhere in your HTML.
>
> >   }
> > if (e.target)
> >   {
> >   el=e.target;
> >   }
> > else if (e.srcElement)
> >   {
> >   el=e.srcElement;
> >   }
> > alert(el.id);
> >
> > }
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iGoogle Developer Forum" 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/Google-Gadgets-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to