When Refresh go 1 again

This is a discussion on "When Refresh go 1 again" within the Web Page Design section. This forum, and the thread "When Refresh go 1 again are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 29th, 2008, 03:22
Banned Member
Join Date: Jan 2008
Location: Puerto Rico
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
When Refresh go 1 again

I have this problem, Put the script on my page. in this script the people vote but When they return to the site the text of this form again at 1 and not recognized the vote. As I keep the voting when users refresh the page

<form name="HOME">
<input type="text" value="1" name="CASA">
<input onclick="document.HOME.CASA.value = Number(HOME.CASA.value)+1;" type="button" value="Vote"> </form>

I want that every user visiting the page can see how many times the button 'Vote' has been pressed by others.

Last edited by gncreditcards; Jan 29th, 2008 at 22:39.
Reply With Quote

  #2 (permalink)  
Old Jan 30th, 2008, 11:35
Reputable Member
Join Date: Sep 2007
Location: UK
Age: 42
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Re: When Refresh go 1 again

thought about using php? Im not an expert at it but someone should be about on here who will easily know. Then you could add a ip log so that no-one can vote twice.
Reply With Quote
  #3 (permalink)  
Old Jan 30th, 2008, 18:24
Reputable Member
Join Date: Dec 2005
Location: U.S.A.
Posts: 147
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to ScottR Send a message via Skype™ to ScottR
Re: When Refresh go 1 again

The first thing is javascript cannot save data without using cookies. Even then it is only for that user, noone else. So a user cannot see what another user is doing with javascript .

As jtyoungs said PHP would be a good route to go (or any server side language..ASP, Cold Fusion, etc.). You will need to save that data somewhere to be accessed later. A database, text file, or XML all would work fine. You can track users to make sure they only vote once but IP addresses can change and cookies can be deleted. As far as I know there is not a guaranteed way to make sure they don't vote twice.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop the browser refresh on clicking the webbrowser's refresh button ? camarun20 JavaScript Forum 3 Mar 18th, 2008 23:04
refresh using javascript SirChinjin JavaScript Forum 0 May 19th, 2007 19:41
Logo changes on refresh Ross Web Page Design 10 Dec 13th, 2006 09:48
Meta refresh WebNinja Web Page Design 2 Nov 22nd, 2006 09:49
How to refresh XML data crashcup Other Programming Languages 3 Feb 6th, 2005 19:05


All times are GMT. The time now is 18:00.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

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