Hi Folks,
I'm trying to create a form with a number of checkboxes, that once changed automatically submit the form. I have the following:
<form id="enquiry" name="enquiry" action="" method="post">
<input type="checkbox" name="1" class="chk" value="1" onchange="document.enquiry.submit()" />
<input type="checkbox" name="2" class="chk" value="1" onchange="document.enquiry.submit()" />
<input type="checkbox" name="3" class="chk" value="1" onchange="document.enquiry.submit()" />
</form>
The form submits to its self, then basically i'm using php to deal with the resulting $_GET variable.
I've tried various different things, but to no avail, basically only the bottom checkbox works!! Eh!!! And thats only in Firefox, in I.E i get a javascript error.
Does what i'm doing look ok?
thanks in advance for reading this...
I'm trying to create a form with a number of checkboxes, that once changed automatically submit the form. I have the following:
<form id="enquiry" name="enquiry" action="" method="post">
<input type="checkbox" name="1" class="chk" value="1" onchange="document.enquiry.submit()" />
<input type="checkbox" name="2" class="chk" value="1" onchange="document.enquiry.submit()" />
<input type="checkbox" name="3" class="chk" value="1" onchange="document.enquiry.submit()" />
</form>
The form submits to its self, then basically i'm using php to deal with the resulting $_GET variable.
I've tried various different things, but to no avail, basically only the bottom checkbox works!! Eh!!! And thats only in Firefox, in I.E i get a javascript error.
Does what i'm doing look ok?
thanks in advance for reading this...