Click to See Complete Forum and Search --> : chaning onSubmit


obviousunknown
07-26-2003, 03:25 AM
If i've got a form, and I've got an 'onSubmit' event, how could I use javascript to change the action. (and don't mind the unconventional coding)

<form name="a" onSubmit="default action">
...do some javascript here and suddenly...
<form name="a" onSubmit="new action">

I'm think 'document.a.onSubmit.value' or something, but I know that's wrong.

thanks

Charles
07-26-2003, 06:39 AM
It's

document.a.onsubmit = function () {}

and note that it's "onsubmit" and not "onSubmit".