onclick="this.form.submit" not submitting

wxdqz

New Member
I'm trying to get a form to submit when a radio button is selected (without having to click a submit button). It doesn't seem to work - in fact nothing at all happens when I click one of the radio buttons.

I tried removing the <input type="submit"> tag and then it appears that the form submits (it reloads) but no data shows up at the database.

When I click the <input type="submit"> button it submits correctly.

Here's the code:

<form method="post" action="/choushow/edithome.php">

<input type="hidden" name="choosescheme" value=http://www.webdeveloper.com/forum/archive/index.php/"yes">

<table border="1" cellspacing="0" cellpadding="5">

<tr><td><a href="/choushow/edithome.php?homeschemeid=3&editentry=yes">The booger look</a></td>
<td><input type="radio" name="homeid" value="3" onclick="this.form.submit()" checked></td>
</tr>
<tr><td><a href="/choushow/edithome.php?homeschemeid=4&editentry=yes">The monkey look</a></td>
<td><input type="radio" name="homeid" value="4" onclick="this.form.submit()" ></td>
</tr>
</table>
<p><input type="Submit" name="submit" value="Select scheme to use"></p>

</form>

Any suggestions?
 
Back
Top