title: How to load external page into "container" div using jQuery Mobile?
body: <p>I am building up a PhoneGap app using jQuery Mobile. I want the app to load a html-page from external source and put it to the "content" div of same html-page where the user clicked the link (but to another "page" div of JQM). </p>
  
  <ul>
  <li>"#booking-content" is the content div where I want the external page
  to load to.</li>
  <li>"#bookings" is the page div what I want to load and show after the<br>
  external page has been loaded.</li>
  <li>"#bookings_link" is the ID of the link what the user clicks and where
  the function call originates from.</li>
  </ul>
  
  <p>Here's click-event -function for the link:</p>
  
  <pre><code>$('#bookings_link').click(function(){'
      $("#booking_content").load("http://www.pagetoload.com",function(){
          $('#booking_content').trigger("pagecreate").trigger("refresh");
          $.mobile.changePage( $("#bookings"), { transition: "slideup"} );
  })
  </code></pre>
  
  <p>I have tried that using jQueryMobile's $.mobile.loadPage -function as well:</p>
  
  <pre><code>$.mobile.loadPage("http://www.pagetoload.com",{pageContainer: $('#booking_content')});
  $.mobile.changePage( $("#bookings"), { transition: "slideup"} );
  </code></pre>
  
  <p>With jQuery's load method, I got the following error message: <strong><em>Uncaught TypeError: Object [object DOMWindow] has no method 'addEvent' at file:</em></strong> and <strong><em>"Unknown chromium eroor: -6"</em></strong></p>
  
  <p>I have also tried to include the logic into the pagebeforechange-loop (http://jquerymobile.com/demos/1.0/docs/pages/page-dynamic.html) but without results. 
  From that, the app is saying: <strong>*Uncaught TypeError: Cannot read property 'options' of undefined at file:///android_asset/www/jquery.mobile-1.1.1.min.js:81*</strong></p>
  
  <p>I have set true the $.support.cors and $.mobile.allowCrossDomainPages settings for cross-domain linking.</p>
  
  <p>I am using jquerymobile 1.1.1 and jquery's core 1.7.1. I am testing it with Android SKD api level 16 AVD.</p>
  
  <p>One weird thing is that I got the pageloading functionality working earlier with the same logic, but since I haven't used SVN I have no possibility to check where's the error in this. </p>
  
  <p>I am completely stuck with this and I would be very grateful if someone could show me the right direction.</p>