title: JavaScript onclick not firing on <li> tag in JSP
body: <p>I have this little JavaScript function:</p>
  
  <pre><code>function exeForm(option, pageToLoad, optionId) {
  
      var frm = document.getElementById("frmSessionForm");
      var frmOpt = document.getElementById("frmSessionOption");
      var frmOptId = document.getElementById("frmSessionOptionId");
  
      frm.action = pageToLoad;
      frmOpt.value = option;
      frmOptId.value = optionId;
  
      frm.submit();
  }
  </code></pre>
  
  <p>The function should be called whenever I click the link. But that won't happen. Here's my HTML code:</p>
  
  <pre><code>&lt;li&gt;&lt;a href="#"&gt;Card&lt;/a&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;a href="#foo" onclick="exeForm(0,'CardManage.jsp',0);"&gt;&lt;/a&gt;Search&lt;/li&gt;
          &lt;li&gt;&lt;a href="#foo" onclick="exeForm(1,'CardManage.jsp',0);"&gt;&lt;/a&gt;Confirm&lt;/li&gt;
          &lt;li&gt;&lt;a href="#foo" onclick="exeForm(2,'CardManage.jsp',0);"&gt;&lt;/a&gt;New&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>What's wrong?</p>