title: How to put XFBML code by ajax?
body: <p>I would like to use javascript (JQuery) to ask the server for XFBML code via ajax.
  The XFBML code will then attached to the DOM.</p>
  
  <p>Here it is the php code:</p>
  
  <pre><code>echo "
  &lt;fb:serverFbml&gt;
      &lt;script type=text/fbml'&gt;
      &lt;fb:fbml&gt;
          &lt;fb:request-form
              action='http://myserver.com/invited.php'
              method='post'
              type='myserver'
              invite='true' 
              content='yo you...'&gt;
              &lt;fb:request-form-submit uid=12312312label='Send to %n ' import_external_friends=false /&gt;
          &lt;/fb:request-form&gt;
          &lt;/fb:fbml&gt;
    &lt;/script&gt;
  &lt;/fb:serverFbml&gt;
  
  "; 
  </code></pre>
  
  <p>and here is the javascript:</p>
  
  <pre><code>function clickME() {
  
      $.ajax(
              {
                  url:'http://myserver.com/fbml_ajax.php',
                  success:attachData,
  
                  type:'GET',
                  dataType:'html',
                  global:false
              }
          );
  
  }
  
  function attachData(data) {
      var myData = data;
      $('#attachnow').html(data);
  }
  </code></pre>
  
  <p>I can't make it work.. it is not attached.<br>
  If I just put the XFBML staticly on the HTML page, it works. but if I attach to DOM it doesn't.  </p>
  
  <p>Is it because of the  tag? or is it because of the data that contains \r\n when return from from server?</p>