1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Counter

Discussion in 'PHP' started by Zidu, Oct 31, 2008.

  1. #1
    I'm looking for a counter that will act in a similar manner:
    http://www.nationalpriorities.org/
    (on the right side at the bottom “Cost of the war in Iraq”)
    I have only java script:
    <div id="counting">1</div>
    <script type="text/javascript">var n=1;
    function plusfigure (n){
        document.getElementById("counting").innerHTML=n;
        n++;
        setTimeout("plusfigure ("+n+")",500);
    }
    plusfigure (n);
    </script>
    
    Code (markup):
    This script is not resistant to refresh.
    Someone could help me?
    Ps.
    Sorry for my english.
    SEMrush
     
    Zidu, Oct 31, 2008 IP
    SEMrush
  2. ads2help

    ads2help Peon

    Messages:
    2,148
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #2
    I think javascript alone can't do this. You might need to store it to database or something
     
    ads2help, Oct 31, 2008 IP
  3. Zidu

    Zidu Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, I know that's impossible in the javascript, needed database. Therefore looking for help in php.
     
    Zidu, Oct 31, 2008 IP