Hello,

I want a form to be only active when a box is checked.

Now i found this code;
Code:
<script language="javascript">

function enableField()
{
document.form1.address2.disabled=false;
}
 
</script>

<input type="checkbox" name="vehicle" value="Bike" /> Acivate form.<br /><br />

<a href="javascript:enableField()">Click here to enable the element<a/>
And this does desactivate the rest of the form, but 1) when i click the link, nothing happens. and 2) I only want it to be activated when the first checkbox is cecked.

To desiactivate you add (disabled="true") btw..

Can someone help?


Thanks!