Short answer: I think you want e.src(), not e.target()
Longer answer: The target of an event is the element that triggered
the event.  This is NOT the same as the element the event was attached
to.

For instance, let's say you had:
    <p id="myP"><img id="myImg" src="whatever.jpg"/></p>
and you hooked up an "onclick" event to myP:
    connect("myP", "onclick", someFunction);
If someone clicks on myImg, it will trigger myP's onclick event.  In
that case, the target would be myImg, but the src would be myP.

When you manually trigger an event, it should have no target, because
there was no element responsible for triggering it.  However, it
should still have a src(), which I believe is what you want.

Hope that helps,
Jeremy

On Sep 20, 11:19 pm, hzlabs <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> the situation:
>
> a <textarea id="ta"> element is connected to the "onchange" event via
>
> connect ("ta", "onchange", function (e) {alert (e.target())});
>
> when a enter some text into the field and leave the textarea, the
> event is triggered
> and the message with the target info appears.
>
> However when i trigger the event by
>
> singal ("ta", "onchange");
>
> "e.target" seems to be undefined / missing
> (JS-Console Message:
>
> "Fehler: this._event has no properties
> Quelldatei:http://unsinn-intranet/js/MochiKit/MochiKit.js
> Zeile: 5057")
>
> What could be wrong / what could i have missunderstood?
>
> (MochiKit Version = 1.4 Revision 1314)
>
> Thank you!
> Helmut


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

Reply via email to