Support » Fixing WordPress » Java script not working

  • Hi. I want to implement java script on one of my sites pages. The script is tv guide and it is provided from another site specialized in tv guides.

    Instalation as they say should be just copy paste a code but that doesnt work for me. Could you please tell me how to implement the this code on site.

    <script type="text/javascript" src=""></script><div class="mojtvprogram" style="text-align:right"> - kompletan <a href="">tv program</a></div>

    Code is provided here

    Thank you

Viewing 11 replies - 1 through 11 (of 11 total)
  • Can you provide a link to the page you are trying to include this code on? That will help troubleshoot why it isn’t working for you.

    I have maintenance mod turned on because the site isnt opened yet is there any other way to provide you with more info or taking the maintenance is the only way

    I am able to place the script you provided into a post and it seems to work.

    Here is a screenshot of how it appears on my site, which is running a default twenty thirteen theme:

    If you can’t provide a link, could you try to use the script on another site to test it? It will be difficult for anyone to troubleshoot this without a live link, unfortunately.

    Thanks Tom. I guess the problem is then specific to my theme. I will try to thinker around it a little bit and if I don’t make it I will get back.

    Wpyogi I will try that and report back the results.

    Have you read this?

    JavaScript cannot be added to post content without a special WordPress Plugin that removes the filters that prevent unwanted code within the post content area for the protection of the user.

    Yeah I have. I dont know how but it worked. I deleted the page and re-created it and it works. But now there is a different CSS problem. If you know how to help please do, I want to place the blocks (HTV1,HTV2,RTL and others) in line and not one above other like on Tom’s screenshot few posts above.

    here is the CSS of the script

    .mojtvprogram {font-family:tahoma, arial, helvetica; color:#d0d0d0; font-size:10px}
    .mojtvprogram a {color:#e0e0e0}
    .mojtvprogram h3 {display:none;text-indent:-9999px;margin:0px; font-size:11px; padding:5px 7px; color:#fff; background:#000}
    .mojtvprogram .tvopen {height:207px; overflow:hidden;}
    .mojtvprogram h4 {font-size:11px;background:#222; margin:0px; padding:0px; color:#a0a0a0; border-bottom:1px solid #000}
    .mojtvprogram h4 a {display:block; color:#fff; padding:5px 6px; border:1px solid #000; text-decoration:none}
    .mojtvprogram h4 a:hover {background:#333; color:#b0b0b0}
    .mojtvprogram table {background:#333; border-collapse: collapse; border-spacing:0px;display:none; color:#333; margin:0 0 0 0px; padding:0px; width:100%; border-bottom:1px solid #000}
    .mojtvprogram table.tvopen {display:block}
    .mojtvprogram h4.tvopen  {height:auto !important; background-color:#666}
    .mojtvprogram td {margin:0px; padding:3px 5px; vertical-align:top; border-bottom:1px solid #000}
    .mojtvprogram td.mojtvtime {text-align:right;background:#292929; color:#d80d1f; font-weight:bold}
    .mojtvprogram td.mojtvtitle {width:100%; color:#d0d0d0}
    .mojtvprogram td.mojtvtitle em {color:#b0b0b0; font-size:10px; font-style:normal}
    .mojtvprogram td.mojtvtitle a {color:#fff; text-decoration:none; border-bottom:1px solid #a0a0a0}
    .mojtvprogram td.mojtvtitle {color:#fff;border-bottom:1px solid #a0a0a0}
    .mojtvprogram .first {background:#D76800 }
    .mojtvprogram .first td {background:#D76800 }
    .mojtvprogram .first td.mojtvtime {color:#000 }
    .mojtvprogram .first td.mojtvtitle a {color:#000; border-bottom:1px solid #333 }

    I guess .mojtvprogram h4 are the blocks. I tried float left and block inline functions but neither worked.

    Again thanks for helping me on this problem I appreciate it very much. and by the way I am not a professional designer or anything and I try my best to get by with google and forums like this so if I ask a noobish question my bad 🙂 .

    so if I ask a noobish question my bad 🙂

    That’s not bad at all – that’s why we’re here. And good for you for figuring things out :)!

    You actually need to get rid of “float” – that makes things go side by side. What you want is “clear” – so try adding that clear: both; to this CSS:

    .mojtvprogram h4 {
        background: none repeat scroll 0 0 #222222;
        border-bottom: 1px solid #000000;
        clear: both;
        color: #A0A0A0;
        font-size: 11px;
        margin: 0;
        padding: 0;

    Tried it on every class but without luck. Still one above other.

    Oh rats, that’s inline CSS – so it’s harder to get rid of it – try adding the float: none !important; to the above –

    .mojtvprogram h4 {
        background: none repeat scroll 0 0 #222222;
        border-bottom: 1px solid #000000;
        color: #A0A0A0;
        float: none !important;
        font-size: 11px;
        margin: 0;
        padding: 0;

    Still nothing. Is it possible that it is again some kind theme problem at my side?

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Java script not working’ is closed to new replies.