I want to integrate Marketo form with my existing website on yii framework. My code works on all the browsers except Firefox.
Excerpt from my code:
$('#button').click(function () { var formData = { 'Email': $('#UserInfo_email').val(), 'FirstName': $('#UserInfo_first_name').val(), 'LastName': $('#UserInfo_last_name').val(), }; MktoForms2.loadForm('//app-ab23.marketo.com', mcId, formId, function (form) { var myForm = MktoForms2.allForms()[0]; myForm.addHiddenFields(formData); myForm.onSuccess(function (values, followUpUrl) { return false; }); myForm.submit(); }); });
I get error on Firefox only with message
Loading failed for the
other browsers do the job correctly
note: munchkinId and formId are changed for posting here.
I just had the same issue on an application that is loading a script with a relative path.
It appeared the script was simply blocked by Adblock Plus.
Try to disable your ad/script blocker (Adblock, uBlock Origin…) or relocate the script such that it does not match your ad blocker's rules.
If you don't have such a plugin installed, try to reproduce the issue while running Firefox in safe mode.
- If you cannot reproduce it in safe mode, it means your issue is linked to one of your plugins or settings.
- Otherwise, it might be a different issue. Make sure you have the same error message as in the question. Also look at the network tab of the developer tools to check if your script is listed (reload the page first if needed).
As suggested above, this could possibly be an issue with your browser extensions. Disable all of your extensions including Adblock, and then try again as the code is loading fine in my browser right now (Google Chrome - latest) so it's probably an issue on your end. Also, have you tried a different browser like shudders IE if you have it? Adblock is known to conflict with domain names with track
and market
in them as a blanket rule. Try using private browsing mode or safe mode.