Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How can I sum text box values on a page?

    I am a school principal (with some web design experience), and I want to create an e-book type manual with questionnaires that can help my teachers to identify certain potential learning problems in children. I have spent days searching through javascript sites to find an existing script, but I haven’t found anything close. It seems like something that would be quick and easy for someone who knows javascript to find or write.

    What it would need to do is allow me to put any number of checkboxes on a page, each with its own numerical value (such as 0, 1, 2, or 3), and when a submit button is pushed, it would total the value of all checked boxes. It would be used to create diagnostic questionnaires. That is, there would be a list of questions, and each question would have choices such as “never”, “sometimes”, and “always”. Never would be given a value of 0, Sometimes would be given a value of 2, and Always would be given a value of 3, etc. When the button is pushed, the value of all boxes checked would be totaled and the total would be displayed.

    It would be especially great if instead of just showing the number it could show the number and display one of several prearranged messages depending on the answer. For example, if score is less than 20, message 1 is displayed…if it is between 20 and 30, message 2 is displayed, etc.

    Different forms would have different numbers of check boxes and values, so it would need to be a “add the value of all boxes on this page” function. For example, some questionnaires might only have “yes” or “no” instead of “sometimes”, “always”, and “never”.

    I have seen a clinic that uses a cgi script, to do this, but I want to find a client side way to do it that can be used without even the need for an internet connection.

    Do you know of such an existing script or even what “category” I would need to search in? If it does not exist, and someone is kind enough to write it up for me, I’d be happy to share some ideas that will make it of good commercial value to others.

    Thanks,
    Dave

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just to get the terminology straight:

    Checkbox provides a mechanism to enter a yes/no answer. For multiple choice answers, you would need to use radio-buttons or select boxes.

    I'm not sure if you will be able to find a generic script to use in your application, but it sure not that hard to develop one.

    As far as "e-book type manual" goes, you may find this helpfull.
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Email or message me, I'll be happy to help you with it personally - however I'll need to see what you have already developed (HTML etc.).

    Anything aimed at spotting potential learning problems in children gets my attention, since I love to learn (something that fortunately I've never really had a problem with, although some of the people on this forum are light-years beyond me ), and I love to teach if I can.

    When you can get someone else to truly understand something you already know, that's a pretty good reward.
    Last edited by whammy; 01-20-2003 at 04:45 AM.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #4
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    I've finally had a chance to email you more detailed info. I appreciate the offer!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •