• Resolved BouW

    (@bouw)


    Hi,

    I want to place some javascript banners on pages.
    The code is never well displayed, the banners do not appear, not even when I place the javascript code using the HTML editor.
    I have consulted numerous websites and the WordPress Codex but can not solve the problem, extremely frustrating.

    Does anyone have an idea how I as a beginner, can add a javascript code to an individule page?

    Greetings,

    BouW

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter BouW

    (@bouw)

    Anyone?

    Thread Starter BouW

    (@bouw)

    No support? Please???

    Hi, what do you mean by banners? Are the fading or scrolling banners?

    Thread Starter BouW

    (@bouw)

    Thanks you for you reply!

    I dont know the diffrence between a fading banner and a scrolling banner, but this is the kind of Javascript banner code I need to place:

    <script type="text/javascript">document.write("<iframe name='banner' src='https://www.usenetjunction.com/scripts/banner.php?a_aid=usenet33fve&a_bid=dcec941d&w=1' framespacing='0' frameborder='no' scrolling='no' width='250' height='250' allowtransparency='true'><a href='https://usenetserver.com/partners/?a_aid=usenet33fve&a_bid=dcec941d' target='_top'>UNS *1 Yr Special 250x250 A</a></iframe>");
    </script>
    <noscript>

    If I place it (with the HTML editor), nothing shows up.

    Greetings,

    Bouw

    Hi, I have never used an iFrame so I have no idea…

    Can I see a link to the page your trying to fix?

    Have you tried putting this javascript in your theme somewhere?

    Dan

    The editor strips out most JavaScript code, especially if you flip back and forth between the visual editor and HTML mode. Try putting the code in a text widget or directly in your theme files. You can use conditional tags to get the code on only certain pages or use a plug-in like Widget Logic. Alternatively, you can turn off the visual editor.

    Another alternative is to drop the JavaScript and simply use the iframe code, example:

    <iframe name='banner' src='https://www.usenetjunction.com/scripts/banner.php?a_aid=usenet33fve&a_bid=dcec941d&w=1' framespacing='0' frameborder='no' scrolling='no' width='250' height='250' allowtransparency='true'><a href='https://usenetserver.com/partners/?a_aid=usenet33fve&a_bid=dcec941d' target='_top'>UNS *1 Yr Special 250x250 A</a></iframe>

    You will still need a plug-in to prevent the editor from stripping out the iframe code – you could try Easy iFrame Loader.

    Thread Starter BouW

    (@bouw)

    Zoonini, thank you so very much, the alternative worked out great!
    I was messing around with this problem for days.

    g3legacy, thank you too for you help!

    Greetings,

    BouW

    My pleasure, glad you got it working. ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Javascript on page’ is closed to new replies.