Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    help creating a dynamic content box to be updated monthly

    I will apologize in advance if this is the wrong forum to post this message in.

    I have been searching for a script that will allow me to create one box on each page of my site where I can update 1 file on a monthly basis and have it automatically change this one box on each page. I've had no luck searching "dynamic content" for exactly what I need.

    I've started playing with <!--#include file="myfile.txt" --> but so far have not been able to have the "myfile.txt" info appear in the box.

    Does anyone have any suggestions on what I can do or where I can go for help?

    Thank you, and again, if I'm posting to the wrong forum, feel free to yell at me & I'll disappear!

    Dianne

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts

    use external js

    create an external js file with this sample code:

    document.write('Hello World!');

    then save it as, say, myjs.js
    then in all the pages you want that placed:

    <body>
    <script type="text/javascript" src="myjs.js"></script>
    ...
    </body>
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    For Javascript (which is the topic for this forum) Glenngv is correct. The way you've been trying to do this is via Server Side Includes (SSIs) which is another animal. That can work as well but your host has to support SSIs and you also have to use the appropriate file extension (usually *.shtml) to let the server know to check your page for SSIs. You'll need to contact your provider to find out whether they support SSIs and what file extension to use. Of course that's all topical for a different forum
    Check out the Forum Search. It's the short path to getting great results from this forum.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •