Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default Day Counter

    Hi, I'm looking for a counter that i can set at any number and will
    automatically add 1 to that number at midnight each night.
    This is to monitor the number of Accident Free Days a company has. I would
    need to reset the counter to zero if/when an accident occurred. I would need
    to use this counter on multiple pages (one for each company). Site is purely
    HTML and no database exists.

    Thanks in advance
    Carol

    daisybakers Guest

  2. Similar Questions and Discussions

    1. RFC: DBIx::Counter - persistent counter class
      Hi, I've been a CPAN consumer for so long, I thought it's about time to start contributing. I wrote a little module that does exactly the same as...
    2. Free Network Tools - Random Password Generator - Link Counter - Hit Counter
      Free Network Tools - Random Password Generator - Link Counter - Hit Counter http://www.sharewareisland.com/onlinetools.asp
    3. hit counter or page counter
      Hi, I need to have a page counter to see how many people access my website. How can this be done? In FrontPage, it's called hit counter. Thanks.
    4. hit counter
      How can I add a hit counter to my web site created in Publisher?
    5. how do I add a hit counter?
      I have published a website using MS Publisher 200, and I can't figure out how to pu t asimple hit counter on my home page....I don't want to...
  3. #2

    Default Re: Day Counter

    On 22 May 2007 in macromedia.exchange.extensions.dreamweaver,
    daisybakers wrote:
    > Hi, I'm looking for a counter that i can set at any number and will
    > automatically add 1 to that number at midnight each night.
    > This is to monitor the number of Accident Free Days a company has.
    > I would need to reset the counter to zero if/when an accident
    > occurred. I would need to use this counter on multiple pages (one
    > for each company). Site is purely HTML and no database exists.
    First, you'd be better asking this in the Dreamweaver General Discussion
    forum. Lots more people read there, and it's closer to on topic.

    You'll need to use javascript. There are a bunch of scripts available;
    do a web search for 'javascript count days script'.

    --
    Joe Makowiec
    [url]http://makowiec.net/[/url]
    Email: [url]http://makowiec.net/contact.php[/url]
    Joe Makowiec Guest

  4. #3

    Default Re: Day Counter

    Hi Carol,

    I'm using the following javascript as a day counter and seems to work well
    enough for me. Note: as I'm not a seasoned script writer, your mileage may
    vary and... hope it helps.

    Dennis

    <script language="JavaScript">
    // day counter
    var now = new Date();
    var gap = now.getTime() - new Date("June 1, 2007"); // <- 'Start' counting
    from Date
    gap = Math.floor(gap / (1000 * 60 * 60 * 24));
    </script>

    <script language="javascript">document.write(gap);</script>

    dpark25 Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139