|
|
Home » ASP » Article
ASP Interactive User Polling Script
|
| Article by: | Corsair (8/4/2002) |
|
| Summary: | This is a script that does a simple voting poll and displays the results in a bar chart. |
|
| Viewed: 24112 times |
Rating (125 votes): |
|
3.7 out of 5 |
|
|
|
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
|
|
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 FilesystemObject by Jeff Anderson
An introduction to the Filesystemobject |
 |
ASP GetTempName by Jeff Anderson
Use the GetTempName method to create a randomly generated temporary file on the server. |
 |
ASP OpenTextFile by Jeff Anderson
An introduction to the OpenTextFile Method of the FileSystemObject |
 |
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. |
 |
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. |
 |
ASP FileExists by Jeff Anderson
An introduction to the FileExistsMethod of the FileSystemObject |
 |
Creating a Dynamic Reports using ASP and Excel by Jeff Anderson
A simple way to generate Excel reports from a database using Excel. |
 |
Concatenate strings in sql by Jeff Anderson
A brief introduction to concatenating strings in an sql query (using SQL server or access databases). |
 |
Add or Subtract Hours in SQL or ASP using DateAdd by Jeff Anderson
A beginners guide to using the SQL DATEADD function to add or subtract hours. Particularly useful when setting the time displayed on the ASP page to a different time zone (eg when the server is in the US, and the site is for a UK audience). |
 |
ASP CreateTextFile by Jeff Anderson
An explanation of the CreateTextFile Method, part of the ASP FileSystemObject |
 |
| |