Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running total using check boxes

Status
Not open for further replies.

DavidPook

Instructor
May 9, 2003
11
BR
Guys,

I am creating a self assessment form for my Intranet web pages.

I would like tick boxes for around 35 questions and at the end of the form, I would like a script to total up the amount of answers....something like this


Q1. what knowledge of Microsoft Word do you have?

The user would then enter in a tick box under the following catorgories:
lots4| some3| little2| none1|
(tick) (tick) (tick) (tick)

So at the end of the form, I would like a running total of ALL ticks placed, whether that be a tick in Q1 under Lots(scoring 4 points) or in Q22 a tick under the none (scoring 1 point) options, and as I say, a grand total of all these scores added together at the bottom of the screen for the user to see his/her score.

Ultimately these would also be sent via email to me direct to my email address.

Is what I am proposing a possibility, if it is, could someone help me out with this as I am a novice to VBS.

Many thanks to you all for you help in advance. :)
 
Is the form on 1 page or mutiple pages?

If its one page you could use client side javascript to add up the values.

oif its mutiple pages then do it in the ASP. If you need help let me know.

 
It is very likely to be just all on one page.

I really need just an example of how the script looks as I should be able to replicate the example for the rest of the questions that I may have.

Hope you can help.

Thanks
 
If you're using ASP to process the form, try something like:

Response.Write Request.Form("NameOfCheckboxElement").Count

If you're using multiple names for the checkboxes, say one for each "level", you'd need to add them like

Response.Write Request.Form("lots").Count + Request.Form("fewer").Count + ... etc

Hope that helps

Jimmeh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top