Problem with selector context

Problem with selector context

I'm currently implementing a simple chat for my website and have a problem.
I want to update the chat messages and the currently active users with ajax. I know how to do it with 2 ajax calls but I want to do it in one.
I have a file which returns the entries and users like this:
  1. <div id="entries">These are the entries</div>
  2. <div id="users">These are the users</div>
My jQuery ajax request looks like this:
  1. $.ajax({
  2.     type: "GET",
  3.     url: "chat.php",
  4.     success: function(retHtml) {
  5.         var entriesHtml = $("#entries", retHtml).html();
  6.         var usersHtml = $("#userlist", retHtml).html();
  7.         $("#chat").html(entriesHtml);
  8.         $("#userlist").html(usersHtml);
  9.     }
  10. });
The variable retHtml contains the HTML I want, but 'entriesHtml' and 'usersHtml' are null.

I already tried wrapping retHtml in $() but that doesn't work either.

Can anyone tell me why that is? Or is there a better way to do this?

Thanks!
Thomas