2011-09-28 109 views
0

必须有一些我不明白阿贾克斯的东西。我想使用ajax在另一个页面(页面A)上显示页面的一部分(页面B)。但链接的页面(页面B)依赖于某些链接的资源(页面C),并且这些资源不会显示在原始页面(页面A)上。有没有办法解决?ajax和链接的资源

这里的脚本(从页B)我想用AJAX原始页面(A)上显示:

echo "<p>To comment, please first prove that you are human being</p>"; 
echo "<form method='post' action='../recapatcha_verify.php'>"; 
require_once('../../phpfunctions/recaptchalib.php'); 
    $publickey = "key"; // you got this from the signup page 
echo recaptcha_get_html($publickey); 
echo "<input type='submit' />"; 
    echo "</form>" 

当这个页面通过Ajax叫 - 在<p>元素显示为好作为formsubmit按钮。但通过链接资源(页面C)访问的recapatcha小部件不显示。我知道脚本的作品,但是,因为如果我加载页面本身(页面B)一切都很好。

有什么想法?建议?谢谢

回答

0

您的recaptcha可能通过运行脚本注入页面。当您将其注入页面(页面A)时,它们不会自动评估。例如,你可以使用jquery的$.ajax()方法来做到这一点。