title: How to modify the content of fb:request-form dynamically using Javascript?
body: <p>I would like to customize my request-form content using javascript.
  Say i have this in my html...</p>
  
  <pre><code>&lt;div id="invite"&gt;
  &lt;fb:serverfbml style="width: 600px; height: 650px;"&gt;
      &lt;script type="text/fbml"&gt;
          &lt;fb:request-form 
              action="index.php"
              method="POST"
              invite="true"
              type="MyApp"
              content="Please have a look at my new __DYNAMICNAME_HERE__. 
                  &lt;fb:req-choice url='http://apps.facebook.com/myapp/' label='View Now!' /&gt;" &gt;
  
              &lt;div class="clearfix" style="padding-bottom: 10px;"&gt;
                  &lt;fb:multi-friend-selector condensed="true" style="width: 600px;" /&gt;
              &lt;/div&gt;
              &lt;fb:request-form-submit /&gt;&lt;/fb:request-form&gt;
      &lt;/script&gt;
  &lt;/fb:serverfbml&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I would like to dynamically change _DYNAMICNAME_HERE_ to something else via Javascript.</p>
  
  <p>Here are the things that i've tried.</p>
  
  <pre><code>function technique1()
  {
     var elem = document.getElementById("invite");
     elem.innerHtml = elem.innerHTML.replace("__DYNAMICNAME_HERE__", "MyName");
     // show div code...
  
     // result is, the current page get's re-rendered inside the div, instead of the FB controls.
  }
  
  function technique2()
  {
     // Delete all code inside the div... then construct the content using javascript.
  
     var elem = document.getElementById("invite");
     elem.innerHtml = text;// text is the div innerHtml code constructed at runtime.
  
     // run show div code
     // result is nothing shows.
  }
  
  function technique3()
  {
     // First, we remove all code from the div
     // put them into another php page called invite.php
  
     var elem = document.getElementById("invite");
     elem.innerHtml = "&lt;iFrame src=\"www.myserver.com/invite.php?name=myname\"&gt;&lt;/iFrame&gt;";
  
     // run show div code
     // It works but requires 1 more request to the server.
  }
  </code></pre>
  
  <p>Does anyone know a technique that does not involve an extra request to the server (invite.php)? Possibly involving FB.XFBML.Host.addElement, refresh etc...</p>
  
  <p>Btw, i'm using Google's Closure the handle popping up the div.</p>
  
  <p>Thanks.</p>