[mochikit] Re: Intercept Form Submit

2007-08-03 Thread Beau Hartshorne

On 27-Jul-07, at 9:45 AM, Karl Guertin wrote:

 What is the most efficient way to intercept a form submit event?
 onsubmit in the form tag?  onclick on the submit button?  Make  
 use
 of the connect function?  Something else?  Additionally, I would
 prefer that this method fail in a way that allowed for a normal  
 submit
 to occur if JavaScript were disabled.

 connect(formElement,'onsubmit',function(e){
  console.log(e); //see what's in the Signal event if you don't know
  return false; //prevent form submission
 });

return false; doesn't do anything here, this should look like:

connect(formElement,'onsubmit',function(e){
 console.log(e); // see what's in the Signal event if you don't know
 e.stop(); // prevent form submission
});

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: Why No DL/DT/DD Functions?

2007-08-03 Thread machineghost

Perhaps it'd be more helpful if I rephrased this question:
If someone (ie. me) were to write createDOM shorthand functions for
DL, DT, and DD, would whoever maintains Mochikit add them?  Or are
those functions for these elements deliberately left out of the
library for some reason?

Jeremy
On Jul 31, 12:14 am, machineghost [EMAIL PROTECTED] wrote:
 The other day I noticed that there is no createDOM shorthand function
 for any of the definition list tags (DL, DT, and DD).  Anyone know why?


--~--~-~--~~~---~--~~
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: Why No DL/DT/DD Functions?

2007-08-03 Thread Bob Ippolito

They are not deliberately left out. If a patch were made to the
documentation and code it'd be applied.

-bob

On 8/3/07, machineghost [EMAIL PROTECTED] wrote:

 Perhaps it'd be more helpful if I rephrased this question:
 If someone (ie. me) were to write createDOM shorthand functions for
 DL, DT, and DD, would whoever maintains Mochikit add them?  Or are
 those functions for these elements deliberately left out of the
 library for some reason?

 Jeremy
 On Jul 31, 12:14 am, machineghost [EMAIL PROTECTED] wrote:
  The other day I noticed that there is no createDOM shorthand function
  for any of the definition list tags (DL, DT, and DD).  Anyone know why?


 


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