When I do this.... new.courses.course_date is the id of an INPUT of type "text".
connect(getElement("new.courses.course_date"), "onkeypress", foo); function foo(){} foo.apply = function (src, e){ dbg_msg("typeof src: "+typeof(srs)+" typeof e: "+ typeof e); for(var o in e){ dbg_msg("o: "+o+" e[o]: "+e[o]); } } On a key press in the text field... 000 061 typeof src: undefined typeof e: object 000 061 o: 0 e[o]: {event(): [object Event], type(): "keypress", target(): [object HTMLInputElement], modifier(): {alt: false, ctrl: false, meta: false, shift: false}, key(): {code: 8, string: "\b"}} That is to say that the first argument passed to apply is undefined, the second is an object with *one* property named '0' and the value is another object that apears to match the object mentioned in the documentation... > Signals triggered by DOM events are called with a custom event object > as a parameter. Use customObject.stop() to do the W3C equivalent of > stopPropagation and preventDefault. You can grab the native event by > accessing customObject.event(). Here is a complete list of this > object's methods: > >From the documentation I expected the first argument to foo.apply to be the INPUT object. The second to be the above object (not as a value contained *in* the second argument. Am I a complete idiot or have I stumbled on an inconsistency? Worik --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---