dialog and load() in ie8

dialog and load() in ie8

I have a page (test.html) with a link to a dialog (dialog.html), that then loads a listview (list.html). This works in all browsers except ie7 and ie8. If I then make the dialog a separate page (test2.html) it loads the list fine in ie7 and ie8.

Any suggestions/solutions?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Two minimal/simplified examples that represents my problem:
https://zero3.dk/guru/testing/test.html
https://zero3.dk/guru/testing/test2.html

test.html
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>test</title>
  5. <link rel="stylesheet" href="styles/jquery.mobile-1.2.0.min.css" type="text/css">  
  6. <script type="text/javascript" src="scripts/jquery-1.8.2.min.js"></script>
  7. <script type="text/javascript" src="scripts/jquery.mobile-1.2.0.min.js"></script>
  8. </head>
  9. <body>
  10. <a href="dialog.html">Open dialog</a>
  11. </body>
  12. </html>

dialog.html
  1. <div data-role="dialog">
  2. <script>
  3. $('#lp-list').load('list.html',function(){
  4. $(this).trigger("create");
  5. });
  6. </script>
  7. <div data-role="header" data-theme="b">
  8. <h1>Lokationsvælger</h1>
  9. </div>
  10. <div data-role="content" id="lp-list">
  11. </div>
  12. </div>

list.html
  1. <ul data-role="listview">
  2. <li>First</li>
  3. <li>Second</li>
  4. <li>Third</li>
  5. </ul>

test2.html
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>test</title>
  5. <link rel="stylesheet" href="styles/jquery.mobile-1.2.0.min.css" type="text/css">  
  6. <script type="text/javascript" src="scripts/jquery-1.8.2.min.js"></script>
  7. <script type="text/javascript" src="scripts/jquery.mobile-1.2.0.min.js"></script>
  8. <script>
  9. console.log("1");
  10. </script>
  11. </head>
  12. <body>
  13. <div data-role="dialog">
  14. <script>
  15. $('#lp-list').load('list.html',function(){
  16. $(this).trigger("create");
  17. });
  18. </script>
  19. <div data-role="header" data-theme="b">
  20. <h1>Lokationsvælger</h1>
  21. </div>
  22. <div data-role="content" id="lp-list">
  23. </div>
  24. </div>
  25. </body>
  26. </html>