title: jQuery Mobile - Swipe - Origin null not allowed by Access-Control-Allow-Origin
body: <p>Okay, before I get buried in sea of red tape for asking a frequently asked question, please hear me out. I am using Phonegap to develop a mobile web app and jQuery for swiping between different pages. By different pages, I mean different HTML files and not divs within one html file. For illustrative purposes, let us take two html files out of the lot I have in the app.</p>
  
  <ol>
  <li>index.html</li>
  <li>test.html</li>
  </ol>
  
  <p>Assume that the control is in test.html and I do the following</p>
  
  <pre><code>&lt;!DOCTYPE html&gt; 
  &lt;html&gt; 
      &lt;head&gt;     
          &lt;title&gt;Test&lt;/title&gt;     
          &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css" /&gt;    
          &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.min.js"&gt;&lt;/script&gt;    
          &lt;script type="text/javascript" src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"&gt;&lt;/script&gt;        
          &lt;script&gt;    
          $(function(){        
            $("#home").bind('swipeleft',function(event, ui){
                            $.mobile.changePage("../index.html", "slide");
                            });       
            });
          &lt;/script&gt;
  &lt;/head&gt; 
  &lt;body&gt; 
      &lt;div data-role="page" id="home"&gt;    
          &lt;div data-role="header"&gt;        
              &lt;h1&gt;Main Page&lt;/h1&gt;    
          &lt;/div&gt;
          &lt;div data-role="content"&gt;            
              &lt;p&gt;Slide finger left&lt;/p&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I read the discussion <a href="https://stackoverflow.com/questions/3595515/xmlhttprequest-error-origin-null-is-not-allowed-by-access-control-allow-origin">here</a> and tried adding "&amp;callback=?" to the end of index.html. That removed the error "Origin null is not allowed by Access-Control-Allow-Origin", but it propped up a new one "Resource not found". The following errors were obtained in Webkit based browsers (Mobile Safari, Chrome). I ran the file in Firefox and got a plain "Error Loading Page" alert on the screen. </p>
  
  <p>Please help me out with this situation. A million thanks in advance!</p>