Only on Firefox “Loading failed for the <script> with source”

匿名 (未验证) 提交于 2019-12-03 01:49:02

问题:

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.

回答1:

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).


回答2:

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.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!