搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Javascrit dont work

  • 5 回覆
  • 1 有這個問題
  • 9 次檢視
  • 最近回覆由 todavy

more options

This javascript to embedd a survey from polldaddy (now crowdsignal.com) does not work in Firefox (but in other browsers):

<script type="text/javascript" charset="utf-8" src="https://secure.polldaddy.com/p/10179279.js"></script>
<noscript><a href="https://poll.fm/10179279">Question nr 1</a></noscript>
This javascript to embedd a survey from polldaddy (now crowdsignal.com) does not work in Firefox (but in other browsers): <pre><nowiki><script type="text/javascript" charset="utf-8" src="https://secure.polldaddy.com/p/10179279.js"></script> <noscript><a href="https://poll.fm/10179279">Question nr 1</a></noscript></nowiki></pre>

由 cor-el 於 修改

所有回覆 (5)

more options

Did you check the Web Console for error messages?

more options

I used a script in Firefox's Web Console to inject the poll into a sample page.

var s=document.createElement('script'); s.setAttribute('src', 'https://secure.polldaddy.com/p/10179279.js'); document.body.appendChild(s);

First try:

Oops, private window has Tracking Protection enabled. Made an exception.

Second try:

  • A call to document.write() from an asynchronously-loaded external script was ignored. 10179279.js:67:14032
  • TypeError: _$(...) is null[Learn More] 10179279.js:67:14276

Okay, there's a script error. Maybe this is due to the way I injected it? Anyway, I don't have any solution for you at this point. Maybe you could check for errors in the Web Console on your actual page.

more options

Thanks for quick answer! Yes there is one error in the consol and its "The resource at “https://secure.polldaddy.com/p/10179279.js” was blocked because content blocking is enabled. ".

But when I embed the code for a survey instead of a poll from Polldaddy it works (see below). Is there a way to make the first code work for everyone with Firefox without changing the FW settings?

Code for survey:

<div class="pd-embed" id="pd_1543611763"></div>
<script type="text/javascript">
  var _polldaddy = [] || _polldaddy;

  _polldaddy.push( {
    type: "iframe",
    auto: "1",
    domain: "webmaster2000tv.survey.fm",
    id: "favorit%C3%A5rstid",
    placeholder: "pd_1543611763"
  } );

  (function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/survey.js':'http://i0.poll.fm/survey.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-embed'));
</script>

由 cor-el 於 修改

more options

Apparently the polldaddy.com site is on the list of sites blocked by Tracking Protection. However, even when I unblocked it, there was a problem with the poll in my test. How about you? See: What happened to Tracking Protection?.

more options

Works here after unblocking the tracking protection (FW 63.0.3 (64-bit)). It works in Edge, Chrome and old IE.

But now something happened! After clicking the "Reset standard setting" in FW and restarting the program, it suddenly works, even though there is a block in "block all trackers" (standard setting). :/

I guess it's solved but I don't know what is the diffrence now!? Did I have some other setting before???

由 todavy 於 修改