Welcome Guest!
Please login
If you do not have an account yet on The Web Squeeze forums, please Register! It’s FREE and there are many benefits:
- Receive Fast Advice
- Learn Programming Languages
- Get Professional Website Reviews
- Quick Troubleshooting Assistance
Ajax Poll
This is a discussion on Ajax Poll, within the Javascript section. This forum and the thread "Ajax Poll" are both part of the Frameworks category.
![]() ![]() |
Oct 5 2008, 01:35 AM
Post
#1
|
|
![]() Squeeze Machine ![]() ![]() ![]() ![]() ![]() Posts: 733 Joined: 13-February 08 From: Borneo |
I came across this example on how to do an AJAX poll.
The only thing is that the author says this: QUOTE In this demo, I haven't limited the number of votes per user. This is something you can implement by setting the Javascript variable useCookiesToRememberCastedVotes to true in the script or by implementing your own method. How can I possibly do that, or do you guys know any good example that I can learn to create a simple poll in my page? Thanks... -------------------- |
|
|
Oct 5 2008, 10:24 AM
Post
#2
|
|
![]() New Squeeze ![]() Posts: 9 Joined: 17-February 08 From: Ohio |
That sounds like a boolean variable in the script. Search for it and change it to true, or write your own function that only allows a user to vote once.
Would need to see the code to know for sure. -------------------- |
|
|
Oct 6 2008, 10:48 PM
Post
#3
|
|
![]() Squeeze Machine ![]() ![]() ![]() ![]() ![]() Posts: 733 Joined: 13-February 08 From: Borneo |
I am not good at JavaScript. If I do, I will have no problem modifying them at the first place
I wanted to do an AJAX poll just like what we have in TWS here. Any good tutorial for me -------------------- |
|
|
Oct 7 2008, 12:36 AM
Post
#4
|
|
|
Rapid Squeezer ![]() Posts: 308 Joined: 15-February 08 From: Finland |
If you show us the code, I'm sure someone can add the "protection" there very quickly. I don't know how good protection you need but if you use just the cookie, users can delete that cookie and do it again but maybe you can worry about that when/if you get problems.
Here's also a good tutorial on creating a jquery/php poll: http://nettuts.com/javascript-ajax/creatin...jquery-and-php/ This post has been edited by Antti: Oct 7 2008, 12:39 AM -------------------- |
|
|
Oct 7 2008, 04:28 AM
Post
#5
|
|
![]() Squeeze Machine ![]() ![]() ![]() ![]() ![]() Posts: 733 Joined: 13-February 08 From: Borneo |
Sorry, I thought I gave the link at my first post there. Anyway here is the link: AJAX Poller and the demo Here
I did came across the tutorial that you gave me but I haven't go through them in detail Thanks anyway... EDIT After a brief read through at the code info, I came across this explanation QUOTE useCookiesToRememberCastedVotes = If set to true, use cookie to prevent user from casting more than one vote
-------------------- |
|
|
Oct 7 2008, 05:08 AM
Post
#6
|
|
|
Rapid Squeezer ![]() Posts: 308 Joined: 15-February 08 From: Finland |
Yes, I found that too but don't have time to check it, if it works. What if you set that to true and try it? Does it work or not?
-------------------- |
|
|
Oct 7 2008, 05:28 AM
Post
#7
|
|
![]() Squeeze Machine ![]() ![]() ![]() ![]() ![]() Posts: 733 Joined: 13-February 08 From: Borneo |
I will try that tonight. I will let you know if it works
Cheers... EDIT Uploaded the code in my WAMP and all I can see is a "mess"! I don't have all day to find a way to make the code work! -------------------- |
|
|
If you found The Web Squeeze to be helpful, please donate so we can keep this site FREE, FRESH, and fortified with Web Design & Development info!
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
7 | Webmaster | 748 | 27th August 2008 - 12:40 PM Last post by: rich97 |
|||
![]() |
12 | thesealportalteam | 484 | 25th February 2008 - 03:31 PM Last post by: thesealportalteam |
|||
![]() |
0 | Ryan | 357 | 7th March 2008 - 07:39 AM Last post by: Ryan |
|||
![]() |
13 | JustinStudios | 343 | 13th March 2008 - 11:51 AM Last post by: velo |
|||
![]() |
7 | Padraig | 459 | 5th September 2008 - 04:00 AM Last post by: Monie |
|||






Oct 5 2008, 01:35 AM








