title: jQuery: loading reCaptcha into a div via ajax
body: <p>I want to create a form that has a div with id "captcha". When the user enters a wrong password, following code is generated in "login.php"</p>
  
  <pre><code>$myCaptcha=recaptcha_get_html($publickey, $error);
  $xml="&lt;captcha&gt;&lt;![CDATA[".$myCaptcha ."]]&gt;&lt;/captcha&gt;";
  echo $xml;
  </code></pre>
  
  <p><code>recaptcha_get_html($publickey, $error);</code> generates this:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=xxxx"&gt;&lt;/script&gt; &lt;noscript&gt; &lt;iframe src="http://www.google.com/recaptcha/api/noscript?k=xxxx" height="300" width="500" frameborder="0"&gt;&lt;/iframe&gt;&lt;br/&gt; &lt;textarea name="recaptcha_challenge_field" rows="3" cols="40"&gt;&lt;/textarea&gt; &lt;input type="hidden" name="recaptcha_response_field" value="manual_challenge"/&gt; &lt;/noscript&gt;
  </code></pre>
  
  <p>I want to get this code with $.post() and insert it into div "captcha". Doing something like this:</p>
  
  <pre><code>$.post("login.php", {requestCaptcha:"yes"}, function(returned){
       $("#captcha").html($("captcha",returned).text());
  },"xml");
  </code></pre>
  
  <p>In IE, it does nothing. In Chrome, it clears up whole page and there is only the called reCaptcha script working like a charm.</p>
  
  <p>Any ideas?</p>