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 }); } })
Comments
Post a Comment