• I’ve got a directory that is constatly updated with gif images every hour. I’ve had to ‘copy’ my page template to display these updated images as the script used doesn’t seem to work on a normal page.

    is thera plugin that can run this code, there’s 3 images updated but the code for one of them is….

    var d = new Date();
    var m = d.getUTCMonth()+1;
    var day = d.getUTCDate();
    var yr = d.getUTCFullYear();
    var sname = yr+"-"+(m < 10 ? "0" + m : m)+"/S-"+yr+"-"+(m < 10 ? "0" + m : m)+"-"+(day < 10 ? "0" + day : day)+".gif";
    var pname = yr+"-"+(m < 10 ? "0" + m : m)+"/P-"+yr+"-"+(m < 10 ? "0" + m : m)+"-"+(day < 10 ? "0" + day : day)+".gif";
    document.write("Signal to noise ratio - Today");

    document.write(“<table><tr><td width=\”800\”><p align=\”center\”><img src=\”scale.gif\” width=\”519\” alt=\”Scale\”><br><img src=\””+sname+”\” width=\”519\” height=\”1038\” title=\”SNR Today\”><br>SNR</td>”);
    document.write(“</tr></table><br><hr><br>”);

    Any help for a numptie would be appreciated.

    Ta

    Alex

Viewing 2 replies - 1 through 2 (of 2 total)
  • try using the (is_page()) conditional to echo the script (don’t forget to include the script tags) in your page.php file?

    Thread Starter g7kse

    (@g7kse)

    I’ve ended up creating a page template with the code in it and it seems to do the trick nicely. Thanks for the help though

    Alex

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding in scripts to pages’ is closed to new replies.