473,756 Members | 7,560 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Vote/Survey ,Poll in and ASP Page

nitindel
67 New Member
Hi All,

Greetings...!!!

I want to have a survey form in an asp Page..and when the user submits in any of the radio buttons..i want to show the results in percentage..

i have used the following code...but i want to make it more customized...pl ease tell me some more links in related to this other than paid software..


<%
on error resume next
u_input=request .form("u_input" ) %>

<% set fso = createobject("s cripting.filesy stemobject")
if session("voted_ before") = "" then
session("voted_ before") = "Yes"
' reads and adds a one to the selected value
g_selected="vot e_count"& u_input &".txt"
set act = fso.opentextfil e(server.mappat h(g_selected))
counter = clng(act.readli ne)
counter = counter + 1
act.close
Set act = fso.CreateTextF ile(server.mapp ath(g_selected) , true)
act.WriteLine(c ounter)
act.Close
end if
%>



<%
g_selected="vot e_counta.txt"
set act = fso.opentextfil e(server.mappat h(g_selected))
counter_a = clng(act.readli ne)

%>



<%
g_selected="vot e_countb.txt"
set act = fso.opentextfil e(server.mappat h(g_selected))
counter_b = clng(act.readli ne)

%>



<%
g_selected="vot e_countc.txt"
set act = fso.opentextfil e(server.mappat h(g_selected))
counter_c = clng(act.readli ne)

%>


<%
g_selected="vot e_countd.txt"
set act = fso.opentextfil e(server.mappat h(g_selected))
counter_d = clng(act.readli ne)

%>


<% total=counter_a +counter_b+coun ter_c+counter_d
%><br>


<br>
Tea&nbsp;<img src="images/red.jpg" height="12" width="<%= (counter_a/total)*100 %>"><%= formatnumber((c ounter_a/total)*100,1) %>%<br>
Coffee&nbsp;<im g src="images/red.jpg" height="12" width="<%= (counter_b/total)*100 %>"><%= formatnumber((c ounter_b/total)*100,1) %>%<br>
Soup&nbsp;<img src="images/red.jpg" height="12" width="<%= (counter_c/total)*100 %>"><%= formatnumber((c ounter_c/total)*100,1) %>%<br>
None&nbsp;<img src="images/red.jpg" height="12" width="<%= (counter_d/total)*100 %>"><%= formatnumber((c ounter_d/total)*100,1) %>%<br>
Total Votes: <%= total %>


Thanks & Regards
Nitin Sharma
Software Engineer
Jan 7 '08 #1
1 1443
snester
12 New Member
I'm not sure I understand the question.. but do you require a way of displaying a graph based upon your visitor counts?

If so, check this out.. http://www.motobit.com/tips/detpg_html-bar-graph-chart/
Oct 6 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
5713
by: GTF | last post by:
PHP Web Survey Idea.. I have been given an opportunity to create a web based survey. This is a fairly lengthy survey of 60 pages on paper (various multiple choice and free form). These are the Requirements: -Provide a web interface to a database -Database stores the data (duh), but the capacity to extract the data
17
1926
by: Istvan Albert | last post by:
Paul McGuire wrote: > Please reconsider the "def f() :" construct. Instead of > invoking a special punctuation character, it uses context and placement, > with familiar old 's, to infuse the declaration of a function with special > characteristics. If this causes def lines to run longer than one line, > perhaps the same rule that allows an unmatched "(" to carry over multiple > lines without requiring "\" continuation markers could be...
4
1482
by: Minh T. Nguyen | last post by:
There are always lengthy discussions about which .NET language is better: C# or VB.NET. However, I am really interested in finding actual figures indicating which .NET language is primarily used in the real world. Not being able to find any legitimate survey with a high sampling rate, I decided to create my own poll here: http://216.119.78.155/minh/dotnetsurvey.html Minh.
1
2006
by: Nico Baumgarten | last post by:
Dear Madam/Sir, You are invited to participate in an international research study. This research project is headed and led by Cambridge student Nico Baumgarten. What is it all about? It is a well-known fact that there exist many differences between cultures. However, how these differences effect motivation if there are effects at all is not yet clear. This survey is set out to change this. With your help, it will be possible to...
1
1448
by: Denis Van der Heyden | last post by:
Hi, I have a friend who creates non-professional films and he is actually on a german website. I want to vote for him a lot of time,and I would need to create a shortcut for the vote. When we open the main page, http://www.prophoto-online.de/index.php?name=photokinavideofun.php his movie: Olivier Naisy, (F)
0
344
by: martinig | last post by:
Outsourcing is often closely related to offshoring in software development, but you can outsource onshore and you can create offshore subsidiaries. This seems to be the current trend for large occidental organisation that want to profit for lower costs in countries like India, but maintain a high control on the process. However, developers in Europe or North America feel no differences if their Asian "competitor" work for a subsidiary or...
5
2686
by: pbd22 | last post by:
Hi. I am trying to poll a long-running process via a hidden IFrame. I am noticing that the online errata gives advice for handling a server response: window.parent.handleServerResponse(); The problem I am having with this is that the above function gets called ***after*** the long-running response is completed.
11
1335
by: Monty Taylor | last post by:
Hey everybody, MySQL has put up a poll on http://dev.mysql.com asking what your primary programming language is. Even if you don't use MySQL - please go stick in a vote for Python. I'm constantly telling folks that Python needs more love, but PHP and Java are kicking our butts... (I know the world would be a better place if the poll were honest, but I'd rather that people got the message that they should do more python development...
0
9462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9287
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9886
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9722
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8723
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6542
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5155
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3817
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2677
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.