JQM Theme after AJAX call from database

JQM Theme after AJAX call from database

Hello, i got a page where i can enter a city. This city is passed the the next html file, and a ajax request getting results via a php skript from my server. This works well, but only without jqm theme. If i refresh the second result page in my browser, the theme applies. Can you help me to fix that? The Theme needs to be applied without browser refreshing. Here is my code:

THE RESULT HTML FILE:
  1. <body>

  2. <div data-role="page" id="event"> 

  3. <script>
  4. $(document).delegate('#event', 'pageshow', function () {
  5.     showEvents();
  6.    
  7.     
  8. });
  9. </script>

  10.   <!-- header -->
  11.   <div data-role="header" data-position="fixed">
  12.     <h1>tell the dj</h1>
  13.   </div>
  14.   <!-- /header --> 
  15.   
  16.   <!-- content -->
  17.   <div data-role="content"> 
  18.   <a href="index.html" data-role="button" data-transition="slide">zurück</a>
  19.     
  20.     <div id="events">
  21.     
  22.     <p id="load">events in deiner nähe werden geladen</p>
  23.     <img src="../img/loader.gif">
  24.     </div>
  25.   </div>
  26.   <!-- /content --> 
  27.   
  28. </div>
  29. <!-- /page -->

  30. </body>

THE showEvents() FUNCTION


  1. function showEvents(){
  2. var eingabe = window.location.search;
  3. var stadt = eingabe.substring(7, 20);

  4. if (stadt=="")
  5.   {
  6.   document.getElementById("events").innerHTML="";
  7.   return;
  8.   } 

  9.   xmlhttp=new XMLHttpRequest();

  10. xmlhttp.onreadystatechange=function()
  11.   {
  12.   
  13.   if (xmlhttp.readyState==4 && xmlhttp.status==200)
  14.     {
  15.     document.getElementById("events").innerHTML=xmlhttp.responseText;
  16.       }
  17.     
  18.   }
  19.   
  20. xmlhttp.open("GET","http://dev.tellthedj.de/db/getevents.php?q="+stadt,true);
  21. xmlhttp.send();


  22. }

My php script works fine.

Thank you in advance!