Hi
I have a page with checkboxes on for users to select which services they want. When someone checks a checkbox it appends it to a textbox. At the moment I have accomplished this by using the following code:
[code]
<script language=”JavaScript” type=”text/javascript”>
<!–
function addser(service)
{
addservice = document.CONTACTFORM.services.value;
addservice = addservice+”,”+service
document.CONTACTFORM.services.value = addservice
}
//–>
</script>
and then I have a lot of checkboxes with the following on:
<input type=’checkbox’ value=’Asphalt’ NAME=’SER1′ onclick=’javascript:addser(this.value);’>
<input type=’checkbox’ value=’Blinds’ NAME=’SER2′ onclick=’javascript:addser(this.value);’>
<input type=’checkbox’ value=’Boiler Flues’ NAME=’SER3′ onclick=’javascript:addser(this.value);’>
etc
So for example if those three checkboxes were checked the value of the input box “services” would be “,Asphalt,Blinds,Boiler Flues”
However, I need it to be able to remove the relevent value (e.g. Asphalt) if the checkbox is unchecked.
Is this possible?
Cheers