title: load ajax contents inside the fancybox
body: <p>Working onjquery stuff, i working on the following code and it works great, i want to add a fancybox to it, i mean rather than opening in same page, i want the contents to be loaded in the fancybox: </p>
  
  <p>Here is my code: </p>
  
  <pre><code>$(document).on('click','#table td a', function(e) {
              var hcall = e.currentTarget.toString();
              var cURL = hcall;
              ax();
              $.ajax({
                      url: 'mypage.php?u='+encodeURIComponent(cURL),
                      crossDomain : true,
                      cache: false,
                      beforeSend: function(xhr) {xhr.setRequestHeader("Access-Control-Allow-Origin","*");},
                      success: function(data){
                          cx();
                          $('#table').html(data);
                      }
                  });
                  e.preventDefault();
  });
  </code></pre>
  
  <p>with fancybox i am trying like this: </p>
  
  <pre><code>$(document).on('click','#table td a', function(e) {
                  var hcall = e.currentTarget.toString();
                  var cURL = hcall;
                  ax();
                  $.fancybox({
              'width':800,
              'height':650,
              'type':'iframe',
              'autoScale':'true',
              openEffect: 'elastic',
              closeEffect: 'elastic',
              aftershow: function() {
                  $.ajax({
                          url: 'mypage.php?u='+encodeURIComponent(cURL),
                          crossDomain : true,
                          cache: false,
                          beforeSend: function(xhr) {xhr.setRequestHeader("Access-Control-Allow-Origin","*");},
                          success: function(data){
                              cx();
                              $('#table').html(data);
                          }
                      });
                      e.preventDefault();
       }
      });
  });
  </code></pre>
  
  <p>but it does seesm to work, it loads the fancybox and the new page also and the fancybox gives 404 error. a object is passed to the url. i am bit confused here</p>