2013-07-23 45 views
0

我使用colorbox jquery显示注册表单在弹出框中。Rebox未显示colorbox

我用下面的脚本发起弹出

<script type="text/javascript" language="javascript"> 

     $(".ajax").colorbox({width:"30%"}); 

</script> 

在弹出我打电话用的Recaptcha登记表。我可以在弹出框中获取所有表单字段,但不能回覆。

我得到recptcha代码发生在AJAX形式验证码与无脚本

<iframe src="http://www.google.com/recaptcha/api/noscript?k=6LdxveQSAAAAADjToPLUgHY6IRxJgreFWwwOF47H" height="300" width="500" frameborder="0"></iframe> 
    <br/> 
    <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea> 
    <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/> 

Popup box without recaptcha

实际登记表没有Ajax

actual regiestration form without ajax

回答

0

的Recaptcha中弹出,可以通过进行以下代码

<head> 

<!-- ... your HTML content ... --> 

    <script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script> 

    <!-- Wrapping the Recaptcha create method in a javascript function --> 
    <script type="text/javascript"> 
    function showRecaptcha(element) { 
     Recaptcha.create("your_public_key", element, { 
     theme: "red", 
     callback: Recaptcha.focus_response_field}); 
    } 
    </script> 

    <!-- ... more of your HTML content ... --> 

</head> 

<body> 

    <!-- ... your HTML <body> content ... --> 

    <div id="recaptcha_div"></div> 

    <input type="button" value="Show reCAPTCHA" onclick="showRecaptcha('recaptcha_div');"></input> 

<!-- ... more of your HTML content ... --> 

<body> 

Google's details information about this problem

结果enter image description here