title: How do I clear the content of a popup window?
body: <p>I have a popup window that shows up when you click on an event on a calendar. On the said popup, I have some textboxes and a list of items that's inside a partial view. Now, my problem is that whenever I select an event that has items on the list then close it and open other events on the calendar, the same items still show up on the other events and its not supposed to because that event has a different id. </p>
  
  <p>How do I clear the item list whenever I close the popup without refreshing the page so that the other events would only display items for the selected event?</p>
  
  <p>This is the part of my code that calls the list</p>
  
  <pre><code>var scheduleData = { scheduleId: calEvent.id };
  $.ajax({ 
     type: 'POST',
     traditional: true, 
     url: '/Schedule/JsonGetItemsBySchedule/',
     datatype: 'json',
     data: scheduleData,
     success: function (result) {
        var itemlist = result.items; loopItems(itemlist); 
     }
  }); 
  </code></pre>