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

Thread: button counter

  1. #1
    New to the CF scene
    Join Date
    Feb 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question button counter

    hello I have created a page with basicly nothing but button links in css What I would like to do is add a counter to each button to how many times it is hit. that will display next to each button. Here is basicly what I am working with.

    <style type="text/css">
    body {
    font-family: "Bookman Old Style",
    Times, serif;
    color: white;
    margin-left: 5%; margin-right: 5%;
    background-color: black;
    background-image: url('http://jlaw1017.com/01.jpg');
    }
    ul.navbar {
    list-style-type: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 6em;
    left: 5em;
    width: 9em }
    ul.navbar li {
    background-color: #680106;
    margin: 0.5em 0;
    padding: 0.3em;
    border-style: outset;
    }
    ul.navbar a {
    font-family: "Bookman Old Style",
    Times, serif; }
    a:link
    {
    color: white;
    background-color: #680106;
    }
    a:visited
    {
    color: white;
    background-color: #680106;}
    a:hover
    {
    color: blue;
    background-color: green;}
    ul.navbar2 {
    list-style-type: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 6em;
    left: 25em;
    width: 9em }
    ul.navbar2 li {
    background-color: #680106;
    margin: 0.5em 0;
    padding: 0.3em;
    border-style: outset;
    }
    ul.navbar2 a {
    font-family: "Bookman Old Style",
    Times, serif; }
    ul.navbar3 {
    list-style-type: none;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 6em;
    left: 45em;
    width: 9em }
    ul.navbar3 li {
    background-color: #680106;
    margin: 0.5em 0;
    padding: 0.3em;
    border-style: outset;
    }
    ul.navbar3 a {
    font-family: "Bookman Old Style",
    Times, serif; }
    </style>
    </head>
    <body>
    <center>
    <font color="red"><b><h1>Title</h1></b></font><hr>
    <ul class="navbar">
    <li><a href="link" target="_blank">name</a>
    <li><a href="link" target="_blank">name</a>
    </ul>

    There are currently 3 sets of these links as I am sure you saw in the css. Any help adding counters would be great.

  • #2
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts
    well you will need a counter from javascript. this cant be done with html or css!

  • #3
    Regular Coder
    Join Date
    Feb 2008
    Location
    Australia baby!
    Posts
    143
    Thanks
    6
    Thanked 3 Times in 3 Posts
    You can grab a very nice counter (and other scripts) at http://www.cj-design.com/products/fr...scripts/page_2
    outseeker - http://outer.reaches.dyndns.org/index.php
    I hope this helped someone. Due to this forums lame rep system penalising me for nothing, and admins inability to do anything about it, I'm sorry to say I will no longer be online here. Pride is important. Good Luck All.


  •  

    Posting Permissions

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