Greetings,
I'm using the following script so when users are filling out a form and hit enter, it doesn't accidentally submit before they are finished:
<script language ="javascript">
function onSubmit()
{
document.registration.submit();
}
</script>
Then my input button looks like this:
input type=button value="Send" onClick="onSubmit()">
On my next page, I run a SQL statement to update a database. It won't update if I use this script. When I take the script out and change the button type to submit and remove the reference to the onclick, it works great. Any thoughts? Does the button have to be type=submit for the database to update? Any thoughts or workarounds would be greatly appreciated. THanks.
I'm using the following script so when users are filling out a form and hit enter, it doesn't accidentally submit before they are finished:
<script language ="javascript">
function onSubmit()
{
document.registration.submit();
}
</script>
Then my input button looks like this:
input type=button value="Send" onClick="onSubmit()">
On my next page, I run a SQL statement to update a database. It won't update if I use this script. When I take the script out and change the button type to submit and remove the reference to the onclick, it works great. Any thoughts? Does the button have to be type=submit for the database to update? Any thoughts or workarounds would be greatly appreciated. THanks.