SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: Demonstrate

  1. #1
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb Demonstrate

    Can anyone make a quick JS that writes a number to the document?

    I want this number to increase by one whenever someone clicks a form button.

    If possible, could anyone make it so it gets saved on my server so every user sees the same number?

    so...

    There have been 1 clicks.

    [Click Me]
    *click*...

    There have been 2 clicks.

    [Click Me]
    thanks!

  2. #2
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone got some links for how to connect this to my server?

  3. #3
    SitePoint Guru SSJ's Avatar
    Join Date
    Jan 2007
    Posts
    830
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What? For Free? Nooooooooope.....

  4. #4
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up Anyone got some links for how to connect this to my server?

    Quote Originally Posted by Leoj00 View Post
    Anyone got some links for how to connect this to my server?
    Anyone got some links for how to connect this to my server?

  5. #5
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you heard about using AJAX. You can connect to your server with AJAX. I am not sure that i understood your exact problem.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  6. #6
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am looking into PHP and Mysql right now. I am running into a lot of problems as you will see if you look over at the MySql forum.

  7. #7
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So basically I need this to +1 whenever someone clicks "Print Story." People can write stories on my site and then I have an onClick="javascript-print..." for them to print their story.

    I want to be able to display how many stories have been printed... a lot like a site counter that records how many people have visited my site. Like a site counter that goes up 1 not by how many people have visited but by how many times the "Print Story" button has been clicked.

  8. #8
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where should I be asking for help on this? JS or Ajax or PhP or MySql?

  9. #9
    SitePoint Zealot
    Join Date
    Mar 2007
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I figured this out. I used PhP and MySql. I had the button write to a database table and then used some PhP command that counted how many table rows there were.


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
  •