Results 1 to 5 of 5

Thread: Live Date script problem

  1. #1
    Join Date
    Jan 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Live Date script problem


  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Sorry but I dont know what you mean. Please try to explain more thoroughly.

    My initial guesses;

    1 - that you want to change the colour of the clock through css styling?
    2 - that you want to move this script to an external js file to tidy up your code?

    If you arnt clear with your request, nobody can help you.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. #3
    Join Date
    Jan 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hi Bev,

    Yes, I want to move the script to an external js file to tidy up the code and so that I can convert the page to xhtml.

  4. #4
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    OK

    First put all the js code into an external file called "livedate.js" and save it somewhere logical on your server (in a folder called "js" perhaps.)
    Only include the part between the opening <script> and closing </script> tag.
    The external "livedate.js" file should not have any <script> tags in it.

    The code to leave in your HTML body should be (change the path to point to the external "livedate.js" file on your server);
    Code:
    <script type="text/javascript" src="path/to/js/livedate.js"></script>
    <span id="clock"></span>
    And as per the script demo page, the body tag should look like this;
    <body onLoad="goforit()">

    That should be it
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  5. The Following User Says Thank You to Beverleyh For This Useful Post:

    craigt56 (03-07-2011)

  6. #5
    Join Date
    Jan 2011
    Posts
    11
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up Yes!

    Thanks Bev! It works just beautifully!

Bookmarks

Posting Permissions

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