2013-07-23 81 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