jquery - reCaptcha does not reload when using Ajax -


i'm building asp.net mcv application, , have page user can search. i'm using ajax result. here's structure of page (simplified) :

// part of page not change <div id = "searchform">     <input id="txwhat" type="text"/>     <input id="txwhere" type="text"/>      <input id="idbnsearch" type="submit" value="search"/> </div>  // result container <div "resultcontainer">     // here put result, , captcha </div> 

what want do, add recaptcha every 20 operations of search. so, added partial view witch contains captcha, , idea is, whene search operations number 20, display captcha partial view, , if recaptcha typed correctly, then, result of typed criteria.

the problem is, because i'm using ajax, captcha not load (no text type). ideas ?

thanks in advance

i assume familiar jquery ajax.

$.ajax(function(){   beforesend: function(){      recaptcha.create("your_key", 'captchadiv', {             tabindex: 1,             theme: "clean",             callback: recaptcha.focus_response_field      });  } }) 

for demo http://www.google.com/recaptcha/demo/ajax


Comments

Popular posts from this blog

matlab - Deleting rows with specific rules -

jquery - How would i go about shortening this code? And to cancel the previous click on click of new section? -