title: Data on site not showing after clicking on sub menu on nested unordered list using ajax with jquery
body: <p>Here is the html unordered list implementation</p>
  
  <pre><code>&lt;div id="dropdownmenu" style="position: fixed; margin: 0 auto; width: 100%; position: fixed; opacity: 1; text-align: center;"&gt;
          &lt;ul id='navbar' class="menu"&gt;
              &lt;li&gt;&lt;a href="Home"&gt;Home&lt;/a&gt;&lt;/li&gt;
              &lt;li class="active"&gt;&lt;a href="#s2"&gt;&lt;%= session.getAttribute("name") %&gt;&lt;/a&gt;
              &lt;ul id='profile' class="submenu"&gt;
              &lt;li id='account'&gt;Account&lt;/li&gt;
              &lt;li id='password'&gt;&lt;a&gt;Change Password&lt;/a&gt;&lt;/li&gt;
              &lt;li id='myitinerary'&gt;&lt;a&gt;My Itineraries&lt;/a&gt;&lt;/li&gt;
              &lt;li id='promotions'&gt;&lt;a&gt;Promotions&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
              &lt;/li&gt;
              &lt;li&gt;&lt;a href="/ExpressBus-war/Logout"&gt;Logout&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>and here is the script i am trying to run</p>
  
  <pre><code>&lt;script&gt;         
              $(function() {
                  $("#dropdownmenu").click(function(event) {
                      if(event.target.id === 'myitinerary')
                      {
                          $.post({
                              type: 'POST',
                              data: {
                                  username: &lt;%= session.getAttribute("username") %&gt;;
                              },
                              url: "GetItineraries",
                              success: function(result){
                                  $('#content2').empty();
                                  $("#content3").empty();
                                  $("#content4").empty();
                                  $('#content').html(result);
                              }
                          });
                      }
                  });
              });
          &lt;/script&gt;
  </code></pre>
  
  <p>I am using Netbeans EE, basically what i intend to do is to fill the content with the result i obtained from the servlet. But so far everything i have tried isnt working out.</p>