• Resolved v3nd0

    (@v3nd0)


    Hello,
    in the beginning I want to notice that I am not programmer and with wordpress I am working just a week ?? We are making event sport result and i have script to integrate in page but this works only on computer where I am editing page (wordpress) and on other devices is show just spinning wheel. code for integration is for example:

    <div id="divRRPublish" class="RRPublish"></div>
    <script type="text/javascript" src="https://my.raceresult.com/RRPublish/load.js.php?lang=en"></script>
    <script type="text/javascript">
    <!--
    	var rrp=new RRPublish(document.getElementById("divRRPublish"), 210488, "results");
    	rrp.ShowTimerLogo=true;
    	rrp.ShowInfoText=false;
    -->
    </script>

    I do not know what is wrong. Please help me how to do it correctly. Thank You

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author David Artiss

    (@dartiss)

    Hi,

    Can you confirm that the script you embedded on your page still matches the one above?

    Whereas you’re using <!-- and --> above, I’m seeing // in both instances when it’s displayed on your page.

    Thread Starter v3nd0

    (@v3nd0)

    Here are screenshots from page:

    page in edit

    and this is what I want and see on my browser:

    Screen

    • This reply was modified 2 years, 7 months ago by v3nd0.
    Plugin Author David Artiss

    (@dartiss)

    Okay, so it appears WordPress itself is transforming those lines. Without a big think and re-write there’s nothing immediate I can do about that.

    However… I’m not sure why those lines are there anyway.<!-- and --> are used to indicate HTML comments, but this is JavaScript. What happens if you remove those 2 lines? i.e. it looks like this…

    <div id="divRRPublish" class="RRPublish"></div>
    <script type="text/javascript" src="https://my.raceresult.com/RRPublish/load.js.php?lang=en"></script>
    <script type="text/javascript">
    	var rrp=new RRPublish(document.getElementById("divRRPublish"), 210488, "results");
    	rrp.ShowTimerLogo=true;
    	rrp.ShowInfoText=false;
    </script>
    Thread Starter v3nd0

    (@v3nd0)

    Without any changes. On mine computer still display as before and on others devices still spinning wheel. I am so confused …

    Plugin Author David Artiss

    (@dartiss)

    Do you know what the difference is between your computer and others? Are you using different browsers, for example?

    Try visiting your website in Private/Incognito and see if it still works.

    Thread Starter v3nd0

    (@v3nd0)

    MacOS :
    opera – logged as administrator works
    safari – without logging not working
    IOS:
    safari, opera – not logged not working
    Win:
    opera – not logged not working
    edge – logged as administrator and work

    looks like administrator/visitor issue?

    Plugin Author David Artiss

    (@dartiss)

    Yeah, so looks as if being logged in makes a difference here.

    At this point, we must part ways. This is not related to the plugin but the code which you’re trying to embed and I can’t assist with that.

    Your best bet here is to go back to wherever you got that code from to ask for assistance – I’m guessing it’s clashing in some way with your site set-up. Looking at the JS console in my browser I’m seeing this error, for example, which appears related to that script…

    [Error] TypeError: $.getJSON is not a function. (In '$.getJSON(rrp_server+"/RRPublish/data/config.php",{eventid:eventid,page:page,noVisitor:getCookie("ys"+eventid)})', '$.getJSON' is undefined)

    Thread Starter v3nd0

    (@v3nd0)

    So after additional searching I have to turn off under Divi – Performance – Enqueue jQuery Compatibility Script. Just for future if someone will have similar issue. Thank a lot for effort and spent time.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘script not shown on website’ is closed to new replies.