[mochikit] Re: event.target missing

2007-10-19 Thread Jonathan Gardner
My opinion is that if you want to simulate a click, you're going to have to create an event that looks like a click and pass that as a parameter to the signal call. On Sep 28, 4:05 am, hzlabs [EMAIL PROTECTED] wrote: Hi Beau, as i stated in the answer to Jeremy, i slightly missunderstood the

[mochikit] Re: event.target missing

2007-09-28 Thread hzlabs
I tried that: - it works when i say signal (parent, onchange, child); or signal (myP, onchange, myImg); to stay in your example. - it does not work when i say signal (child, onchange, child); or signal (myImg, onchange, myImg); and the event is only connected in the parent DOM element myP!

[mochikit] Re: event.target missing

2007-09-28 Thread hzlabs
Hi Beau, as i stated in the answer to Jeremy, i slightly missunderstood the behaviour of signal in that sense that signal would emulate an event, rather then just calling the connected function (more or less..). But anyway, i will look into the Signal.js 's source code to really understand

[mochikit] Re: event.target missing

2007-09-27 Thread machineghost
If yes, could i set this behaviour onto a wish list That's Bob's department; I'm just some shmoe who reads this list ;-) However, I do have a thought to solve your problem: why not just pass the fake target as an extra argument of Signal? In other words, if you want to simulate a click on

[mochikit] Re: event.target missing

2007-09-27 Thread Beau Hartshorne
On 26-Sep-07, at 10:59 PM, hzlabs wrote: But what i did expect was, that when i send a signal to the target via the signal function - myImg in your example - the event object e should contain both e.target() (myImg) and e.src() (myP). The later as the DOM element the function is connected

[mochikit] Re: event.target missing

2007-09-26 Thread machineghost
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=myPimg id=myImg src=whatever.jpg//p and you hooked up an

[mochikit] Re: event.target missing

2007-09-26 Thread hzlabs
Thank You Jeremy! Yes, i did understand that e.src() is not nessesarily e.target() - target() could be a child DOM element of src(). scr() is the DOM element the event is connected to. But what i did expect was, that when i send a signal to the target via the signal function - myImg in your