title: jquery atmosphere cross domain restrictions
body: <p>i'd like to connect to a comet server using jquery atmosphere plugin. Problem is the server is located on a different domain and "As of v 0.7.2, Atmosphere JQuery PubSub does not support cross domain requests. We cannot use this method for JSONP". Is there any ways to circumvent this? I'm open to any solution!</p>
  
  <p>Here is the javascript code used in the given example page on the remote domain:</p>
  
  <pre><code>    $(document).ready(function() {
  
      function callback(response) {
          // Websocket events.
              $.atmosphere.log('info', ["response.state: " + response.state]);
          $.atmosphere.log('info', ["response.transport: " + response.transport]);
  
          detectedTransport = response.transport;
          $('ul').append($('&lt;li&gt;&lt;/li&gt;').text("Resp Status : "+response.status+" Transport : "+response.transport));
          if (response.transport != 'polling' &amp;&amp; response.state != 'connected' &amp;&amp; response.state != 'closed') {
          $.atmosphere.log('info', ["response.responseBody: " + response.responseBody]);
          if (response.status == 200) {
              var data = response.responseBody;
              if (data.length &gt; 0) {
                 dataArray = eval("("+data+")");
  
                 $.each(dataArray, function(index, value){
                   var output = '';
                   var dipData = value;
                   for (property in dipData) {
                      output += property + ': ' + dipData[property]+'; ';
                   }
  
                   $('ul').append($('&lt;li&gt;&lt;/li&gt;').text(dipData.__publicationName+":"+output));
                 });
              }
          }
          else{
  
          }
          }
      }
  
         // As of v 0.7.2, Atmosphere JQuery PubSub does not support
         // cross domain requests. We cannot use this method for JSONP
         $.atmosphere.subscribe(document.location.toString() + 'webcast', callback);
      });
  </code></pre>
  
  <p>Thanks</p>