[thelist] Form Submittal on Enter

.jeff jeff at members.evolt.org
Mon Jan 28 14:30:01 CST 2002


ken,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Ken Kogler
>
> Yup. Get rid of <input type="submit"> and replace it
> with <input type="button" value="Submit"
> onClick="doSomething();">
>
> Here's the JavaScript function I've used:
>
> <code>
> <script LANGUAGE="Javascript">
> function submitsthis() {
>   document.forms[0].submit();
>   }
> </script>
> </code>
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

this doesn't stop non-js users though.

glad to see you're not calling the submit() method from a non-form control,
thereby completely neutering the form for non-js users.  you *don't* wanna
get that conversation started.  ;p

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/





More information about the thelist mailing list