samedi 31 janvier 2015

javascript of recaptcha is not working


please help...


when i use the code below used in the form it does not open the form at all in the lightbox / fancybox. but when i remove it it works.


Code:



<script type="text/javascript">
Recaptcha.create("6Ld5necSAAAAAMNoodwSDBwEWAQi3Yd3VHHSsZnr",
"recaptcha",
{
theme: "red",
callback: Recaptcha.focus_response_field
}
);
</script>


Button is like this:



<li class="email gradient_button"><a href="forms/friends.php?recaptcha" class="fancybox_div">Email to a Friend</a></li>


and the form is like this:



<form name="email_friend" method="post" class="ajax_form">
<table>
<tr><td>Name: </td> <td> <input type="text" name="name"></td></tr>
<tr><td>Email: </td> <td> <input type="text" name="email"></td></tr>
<tr><td>Friends Email: </td> <td> <input type="text" name="friends_email"></td></tr>
<tr><td colspan="2">Message:<br>
<textarea name="message" class="fancybox_textarea"></textarea></td></tr>
<tr><td colspan='2'><br><div id='recaptcha'></div></td></tr> <tr><td colspan="2"><input type="submit" value="Submit" class="pull-left"></td></tr>
</table>
</form>


The full file of form looks like this:



<h3>Email to a Friend</h3>

<form name="email_friend" method="post" class="ajax_form">
<table>
<tr><td>Name: </td> <td> <input type="text" name="name"></td></tr>
<tr><td>Email: </td> <td> <input type="text" name="email"></td></tr>
<tr><td>Friends Email: </td> <td> <input type="text" name="friends_email"></td></tr>
<tr><td colspan="2">Message:<br>
<textarea name="message" class="fancybox_textarea"></textarea></td></tr>
<tr><td colspan='2'><br><div id='recaptcha'></div></td></tr> <tr><td colspan="2"><input type="submit" value="Submit" class="pull-left"></td></tr>
</table>
</form>

<script type="text/javascript">
Recaptcha.create("6Ld5necSAAAAAMNoodwSDBwEWAQi3Yd3VHHSsZnr",
"recaptcha",
{
theme: "red",
callback: Recaptcha.focus_response_field
}
);
</script>


when i remove the javascript part it opens the form in lightbox / fancybox but with this code it does not open anything.


can you please tell me the issue???





Aucun commentaire:

Enregistrer un commentaire