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.
|
|
|
|
|
![]() |
||
When Refresh go 1 again
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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. |
|
|
|
|||
|
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.
|
|
|||
|
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. |
![]() |
| Thread Tools | |
|
|
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 |