codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:



Home » ASP » Article

ASP Interactive User Polling Script

Article by: Corsair (8/4/2002)
Bookmark us now! Add to Favourites
Email a friend!Tell a friend
Sponsored by: FindMyHosting - Web Hosting Search
Summary: This is a script that does a simple voting poll and displays the results in a bar chart.
Viewed: 20584 times Rating (125 votes): 
 3.7 out of 5
 Rate this Article  Read Comments  Post Comments


Download source code - 6 KB
View live demo

This is a script that does a simple voting poll. You can put it in an IFRAME if you wish to have a small voting poll that will update on your page, or do what you will. I redid this script to allow for the use of solid color images to display bar graphs instead of just writing out the percentages. I also redid the percentage calculations so they will be more accurate and should be closer to adding up to 100, if they don't add up to 100 all the time. I named the file PollScript.asp, but if you name it something else make sure you update the variable named "strThisFile" which is at the top of the page in the GLOBAL VARIABLES Section. Make sure to modify the strFileLocation string to match where your database directory or other write-permissible directory is at. I commented the page thoroughly so it shouldn't be too hard to find what you want to change.



Download source code - 6 KB
View live demo



CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
Rate this article:     Poor Excellent
View highlighted Comments
User Comments on 'ASP Interactive User Polling Script'
Posted by :  Archive Import (ericsandin.com) at 14:38 on Friday, January 31, 2003
This worked once, then when I cleared the results I got an error message that says:

Input past end of file
/PollScript.asp, line 207

Now that is all I get. Anyone else get this?



Posted by :  Archive Import (d) at 13:19 on Thursday, March 13, 2003
ericsandin - the file needs to have the correct number of lines (1 for each option and a final one for the total) - set them all to 0 and it should work again. I think the script could indeed be improved by checking fully for correct format of the file.
Posted by :  Archive Import (ling) at 13:51 on Monday, April 07, 2003
Anyone can teach me how to use the database to store the result instead of the textfile?
Posted by :  Archive Import (LongGone) at 05:37 on Tuesday, June 17, 2003
How come i can't see the results after clicking on the "view Results"? I got the results as shown below.

----------------------------------------

DownLoad Source Code - 6KB
Return to Script



Download Source Code - 6KB
Return to script

----------------------------------------
Posted by :  Archive Import (Shujaat) at 01:15 on Tuesday, August 19, 2003
heheh! not at all when i click the see result link nothing shown . buah

leave it
Posted by :  rajat.kapoor82 at 05:27 on Monday, January 03, 2005
hey i am getting an error saying
Input past end of file
/polls/pollscript3.asp, line 220

when i press the submit button.
can anyone help meto remove this error
Posted by :  JohnJohnson at 15:13 on Sunday, July 30, 2006
After clicking on submit button there was no result !
Posted by :  davidclangley at 12:20 on Friday, February 16, 2007
Hi There

I have put the code into one of my html web pages and it works, but does not display the results too well.

How do i get the results to be displayed in a new page

Many Thanks

Dave


To post comments you need to become a member. If you are already a member, please log in .

 



RELATED ARTICLES
ASP Format Date and Time Script
by Jeff Anderson
An ASP script showing the variety of date and time formats possible using the FormatDateTime Function.
ASP FilesystemObject
by Jeff Anderson
An introduction to the Filesystemobject
Email validation using Regular Expression
by Jeff Anderson
Using regular expression syntax is an exellent way to thoroughly validate an email. It's possible in ASP.
Creating a Dynamic Reports using ASP and Excel
by Jeff Anderson
A simple way to generate Excel reports from a database using Excel.
Create an ASP SQL Stored Procedure
by Jeff Anderson
A beginners guide to setting up a stored procedure in SQL server and calling it from an ASP page.
Creating an SQL Trigger
by Jeff Anderson
A beginners guide to creating a Trigger in SQL Server
ASP Shopping Cart
by CodeToad Plus!
Complete source code and demo database(Access, though SQL compatible) to an ASP database driven e-commerce shopping basket, taking the user through from product selection to checkout. Available to CodeToad Plus! Members
Concatenate strings in sql
by Jeff Anderson
A brief introduction to concatenating strings in an sql query (using SQL server or access databases).
ASP OpenTextFile
by Jeff Anderson
An introduction to the OpenTextFile Method of the FileSystemObject
The asp:checkbox and asp:checkboxlist control
by David Sussman, et al
Checkboxes are similar to radio buttons, and in HTML, they were used to allow multiple choices from a group of buttons.








Recent Forum Threads
• hidden div block when displayed, displays at an offset of 200px only in IE 6..
• help - sketch
• Re: Perl Script - File Handling.
• Open a file from website
• Re: to open 5 terminals from one and also execute different commands on each terminal
• read a selected multiple line, those should match some of the values read in the files..
• Help me please
• Empty the contents of a file.
• Month Start, End dates


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2008