Hi, I am trying to override the submit of an aiContactForm created on Joomla using the ajaxForm jQuery plug in.
When submiting the form, the beforeSubmit event gets executed fine, then the form submit works on the server as I get the email response, but before my success function executes I get an error:
Permission denied for <domain> to call method Location.toString on <SAME domain>.
As far as I've read, this is a problem when executing scripts on another domain. This is not my case, the script is on the same domain, and on the error, it shows both times the same domain. I also don't have any flash on the page.
Every solution on the internet points to a problem with flash or with different domains. This is not my case.
This is my form header:
<form enctype="multipart/form-data" name="adminForm_1" id="adminForm_1" method="POST" action="index.php"></form>
This is the javascript:
function initForm(){
var formOptions = {beforeSubmit: sendMsgForm, success: showSuccess};
$('#adminForm_1').ajaxForm(formOptions);
}
$(document).ready(initForm);
function showSuccess(){
$("#aiContactSafeBtns").after('Insert some text');
}
Any help would be really appreciated. I've been looking at this issue for a couple of days now, and I don't seem to find a solution either online or on my own.