2013-08-08 4 views
1

ASP.NET MCV 응용 프로그램을 빌드 중이며이 페이지에서 사용자가 검색을 수행 할 수 있습니다. 나는 Ajax를 사용하여 결과를 얻는다. 내 페이지의 구조는 다음과 같습니다.Ajax를 사용할 때 reCaptcha가 다시로드되지 않습니다.

// The part of my page that does not change 
<div id = "searchForm"> 
    <input id="txWhat" type="text"/> 
    <input id="txWhere" type="text"/> 

    <input id="idBnSearch" type="submit" value="Search"/> 
</div> 

// The result container 
<div "resultContainer"> 
    // Here is where I put the result, and the captcha 
</div> 

내가 원하는 것은 reCaptcha를 검색 작업 20 개마다 추가하는 것입니다. 그래서, 나는 captcha를 포함하는 부분 뷰 마녀를 추가했고, 아이디어는 검색 조작 번호가 20이 될 때 Captcha 부분 뷰를 표시하고 reCaptcha가 올바르게 입력 되었다면 입력 된 결과를 얻습니다. 기준.

문제는 Ajax를 사용하기 때문에 captcha가로드되지 않습니다 (입력 할 텍스트 없음). 어떤 아이디어?

미리 감사드립니다.

+0

리콜 보안 문자에 대한

$.ajax(function(){ beforeSend: function(){ Recaptcha.create("YOUR_KEY", 'captchadiv', { tabindex: 1, theme: "clean", callback: Recaptcha.focus_response_field }); } }) 

: beforeSend 기능()? – tonoslfx

+0

Ajax를 통해 호출하는 방법? 나는 HTML 도우미를 사용하고있다. Html.GenerateCaptcha() – SidAhmed

+0

catpcha를위한 어떤 종류의 클래스 또는 플러그인일까요? – tonoslfx

답변

관련 문제