title: How to load a remote content into a dialog box with jquery?
body: <p>I'm trying to load a remote content of my site with jquery, but I constantly get an error: </p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load
    'anylink_here'
    Origin null is not allowed by
    Access-Control-Allow-Origin.</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>jQuery(function(){
      $('#checkout').submit(function(e){
          //prevent default behavior and hide possibly existing pop-up
          e.preventDefault();
          //process request
          var form = this;
          var url = form.action;
          var dialog = $('&lt;div id="lightbox_dialog"&gt;&lt;/div&gt;').appendTo('body');
          // load remote content
          dialog.load(
              url,
              function (response, status, xhr){
                  dialog.html(response);
              });
          dialog.dialog();
          //prevent the browser to follow the link
          return false;
      });
  });
  </code></pre>
  
  <p>And a form code:</p>
  
  <pre><code>&lt;form id="checkout" action='http://me.me/' method='get'&gt;
          &lt;input type="image" class="class1" onclick="this.form.action='http://en.wikipedia.org/wiki/Sample'" title="Title" value="" src="http://4cornersautoloan.com/images/SmallButton.gif"&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>I also need to do it for the same domain but from http to https.</p>