[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 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 what's
 going on. But this may take a while..

 Thanks again
 Helmut

 On 27 Sep., 20:17, Beau Hartshorne [EMAIL PROTECTED] wrote:

  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 to the event, target as the
   element the signal was sent to..

  Helmut,

  This looks useful. I'd encourage you to try to modify Signal to make
  it work the way you'd like, and submit a code patch to http://
  trac.mochikit.com/. If it looks OK, I'll commit the change to MochiKit.

  Thank you!
  Beau


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[mochikit] Re: window onclick doesn't work in IE

2007-10-19 Thread Beau Hartshorne

On 19-Oct-07, at 2:30 AM, Olli Wang wrote:

 Hi, I just tried:

 connect(window, 'onclick', function () {alert('test')})

 When I click on the window I should get an alert message. But it works
 fine on Fx, Safari and Opera, but not in IE 6 and IE 7. What's wrong
 about this function for IE? Any help would be appreciated.

Olli, try connecting to the document object. That might do what you  
want. So:

connect(document, 'onclick', function () {alert('test')})

Beau


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[mochikit] Re: window onclick doesn't work in IE

2007-10-19 Thread Olli Wang

Thanks, it works. :)

On Oct 19, 11:12 pm, Beau Hartshorne [EMAIL PROTECTED] wrote:
 On 19-Oct-07, at 2:30 AM, Olli Wang wrote:

  Hi, I just tried:

  connect(window, 'onclick', function () {alert('test')})

  When I click on the window I should get an alert message. But it works
  fine on Fx, Safari and Opera, but not in IE 6 and IE 7. What's wrong
  about this function for IE? Any help would be appreciated.

 Olli, try connecting to the document object. That might do what you
 want. So:

 connect(document, 'onclick', function () {alert('test')})

 Beau


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---