url: "verify",
data: comment_data,
success: function() {
+ var new_post = "<h3><a href='mailto:" + email
+ + "'>" + name + "</a></h3>"
+ + text + "<br><br>";
+ $('#comments').prepend(new_post);
+ $('#comment').hide();
console.log('posted new comment');
}
});
$publickey = $this->recaptcha_publickey;
echo <<<END_CAPTCHA_STYLE
<script type="text/javascript">
-function showRecaptcha() {
Recaptcha.create("$publickey",
"recaptcha_div",
{
custom_theme_widget: 'recaptcha_widget',
callback: Recaptcha.focus_response_field
});
-}
</script>
END_CAPTCHA_STYLE;
require_once('includes/recaptchalib.php');
// Trailing slash is necessary for reloads to work
- $url = $this->url . "verify";
+ $url = $this->url . "verify/";
echo "<form id=\"comment_form\" method=\"post\" action=\"$url\">";
- echo <<<END_OF_FORM
+ echo <<<END_OF_FORM
<div id="comment">
-<h3><a onclick="showRecaptcha();">comment?</a></h3>
<div id="recaptcha_div">
<br>
<div style="float:right;position:relative;width:100px;"><div id="recaptcha_image"></div></div>
<br><br><br><br>
</div>
+END_OF_FORM;
+ echo recaptcha_get_html($this->recaptcha_publickey);
+ echo <<<END_OF_FORM
</div>
<input class="submit" type="submit" value="comment">