[thelist] javascript: submit on enter

MRC Webmaster webmaster at equilon-mrc.com
Tue Oct 30 18:22:12 CST 2001


gkm,

> when a user hits 'enter', the form submits to the same page and nothing
> happens.  how do i execute the 'perfIt' function when a user hits the
> 'enter' key from the first input bar (without clicking the button)?

Change this...

> <form name="perf">

to this:

> <form name="perf" onsubmit="return perfIt(this);">

and remove the onclick stuff from your input. Be sure that the perfIt
function actually returns a Boolean (true/false) value.

James Aylard





More information about the thelist mailing list