title: classic asp checkbox state as checkbox
body: <p>I have not used checkboxes before and need some help.  I have a classic asp/html page.  I have an unknown number of people and there are 3 checkboxes for each person.  The user needs to check certain boxes based on information shown on the page.  I need to set some values on the same page based on which checkboxes are checked.  I've tried several ways and have not had any luck.</p>
  
  <p>There is a loop that displays each persons name and these three checkboxes:
  <code>&lt;td align="center"&gt;&lt;input type="checkbox" id="chkden" name="chkden" onclick="chkden();" value=&lt;%=strempdental%&gt;/&gt;&lt;/td&gt; 
  &lt;td align="center"&gt;&lt;input type="checkbox" id="chkort" name="chkort" onclick="chkort();" value=&lt;%=strOrtPlan%&gt;/&gt;&lt;/td&gt;<br>
  &lt;td align="center"&gt;&lt;input type="checkbox" id="chkvis" name="chkvis" onclick="chkvis();" value=&lt;%=strempvision%&gt;/&gt;&lt;/td&gt;</code></p>
  
  <p>Here is the javascript I have at the top of the page.  Neither of the options shown for Javascript work.</p>
  
  <pre><code>function chkden()
  {
  streesubden.value = checkbox.checked ? strempdental.value : '';
  }
  function chkort()
  {
    if(document.getElementById('chkort').checked)
          streesubort.value = strortplan :'';
  }
  function chkvis()
  {
    if(document.getElementById('chkvis').checked)
          streesubvis.value = strempvision :'';
  }
  </code></pre>
  
  <p>e.g if "chkden" is checked then I need to set streesubden = strempdental.  If it's not checked then streesubden will be blank.  I need to do this before I submit to the SQL table.</p>