Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-04-2004, 12:39 PM
WebProWorld Member
 

Join Date: Jul 2003
Posts: 39
SusieG RepRank 0
Default Poll with javascript

Hello

I'm trying to add a poll to my website. Once you have made your selection you can never get back to the voting options.

In this script it has a facility to prompt users that you can only vote once but I can't get it working.

Can anyone advise me? I have posted the code below.

Thanks
Susie



<CFPARAM NAME="Client.Voted" DEFAULT="False">
<CFPARAM NAME="action" DEFAULT="">

<CFIF IsDefined("rdo_AnswerID") AND Client.Voted EQ "False" AND action EQ "vote">
<CFQUERY DATASOURCE="#DataSource#">
UPDATE tblAnswers
SET Votes = Votes + 1
WHERE AnswerID = #rdo_AnswerID#
</CFQUERY>
<CFSET Client.Voted = "True">
<CFLOCATION URL="#HTTP_REFERER#">
<CFSET Client.Voted EQ "True" AND action EQ "vote">
<SCRIPT LANGUAGE="JavaScript">alert("You are only allowed to vote once.");</SCRIPT>
<CFLOCATION URL="#HTTP_REFERER#">
</CFIF>
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: ,



Thread Tools
Display Modes

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

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


Search Engine Optimization by vBSEO 3.2.0