ReCaptcha不会出现在Facebox上

时间:2011-03-25 10:38:38

标签: php ajax recaptcha facebox

<?php 
session_start(); 
require_once('recaptcha/recaptchalib.php'); 
$publickey = "API_KEY"; // you got this from the signup page 
?> 
<script type="text/javascript" src="javascripts/jquery.form.js"></ 
script> 
     <script type="text/javascript"> 
        $(document).ready(function() { 
                $('#inquiry').ajaxForm({ 
                        target: '#error', 
                        success: function() { 
                        $('#error').fadeIn('slow'); 
                        } 
                }); 
        }); 
        var RecaptchaOptions = { 
                theme : 'clean' 
        }; 
    </script> 
<div class="top_area">Inquiry Form</div> 
    <div id="search_area"> 
    </div> 
<div style="overflow-y: hidden;"> 
<form name="inquiry" id="inquiry" action="asadadasd.php" 
method="post"> 
<div id="error"></div> 
<table align="center"> 
<tr> 
        <td valign="top" align="right"></td> 
        <td> 
                <?php 
                  echo recaptcha_get_html($publickey); 
                ?> 
        </td> 
</tr> 
<tr> 
        <td valign="top"></td> 
        <td> 
                <input type="submit" id="submit" name="submit" value="Submit" 
style="height: 30px; background: #ab2220; border: 2px #fff solid; 
color: #fff;" /> 
        </td> 
</tr> 
</table> 
</form> 
</table> 
</form> 
</div>

这是我现在的代码,但是recaptcha插件没有出现 我错过了什么吗? 多谢你们, 你太棒了

1 个答案:

答案 0 :(得分:0)

您必须在facebox上使用recaptcha AJAX API。在页面中包含AJAX脚本(不会显示页面框。将其放在包含的页面中)然后使用文档中指定的recaptcha api。

http://code.google.com/apis/recaptcha/docs/display.html#AJAX