The following questions use the following form element: <form name="pizza"> <input type="radio" name="type" value="meat" checked="checked"/> <input type="checkbox" name="sausage" /> <input type="checkbox" name="pepperoni" /> <input type="checkbox" name="ham" /> <input type="radio" name="type" value="veggie"/> <input type="checkbox" name="pepper" disabled="true" /> <input type="checkbox" name="onion" disabled="true"/> </form>
  1. 1 points: What javascript event handler should handle the pressing of a radio button or checkbox button? onClick

  2. 4 points: Write a javascript function named enabler that takes as a parameter a radio button object and enables/disables the appropriate checkboxes based on the value of the button. For example, when the "veggie" button is pressed, the veggie items should be enabled and the meat items should be disabled. Do not bother with clearing the checkboxes when they are disabled.
    function setter(meat_flag, veggie_flag) {
      with ( {
        sausage.disabled = meat_flag;
	pepperoni.disabled = meat_flag;
	ham.disabled = meat_flag;
	onion.disabled = veggie_flag;
	pepper.disabled = veggie_flag;
    function enabler(button) {
      if (button.value == "meat") 
	setter(false, true);