htaccess blocking jQuery request
Hi all,
I have a problem with htaccess blocking a jQuery form request.
I use the following jQuery to process a form when the submit button is pressed
[code]
<script type="text/javascript">
jQuery("form").eq(0).ready(function() {
jQuery(".submitform").submit(function(){
jQuery.post("includes/process_form.php", jQuery(".submitform").serialize(),
function(data){
if(data.email_check == 'invalid'){
jQuery("#error").html("<div class='errorMessage'>Sorry " + data.name + ", " + data.email + " is NOT a valid e-mail address. Try again.</div>");
} else {
jQuery("#error").html("<div class='successMessage'>" + data.email + " is a valid e-mail address. Thank you, " + data.name + ".</div>");
}
}, "json");
return false;
});
});
</script>
[/code]
It calls a php script called includes/process_form.php
The trouble is, I have the follownig htaccess file in the includes folder
[code]
<Files *.php>
Order Deny,Allow
Deny from all
</Files>
[/code]
And that htaccess file is blocking my jQuery from accessing process_form.php
Can you tell me what I'm doing wrong?
I don't want to lower the security in my htaccess file if possible.
There must be a way to get a jQuery request to work like a regular form request so htaccess doesn't block it.