• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to get total value from checkbox list?

Explorer ,
Apr 23, 2012 Apr 23, 2012

Copy link to clipboard

Copied

I have a list of checkbox items - all number values. I want to then get the total value from all of the check items and add that value to the database. Can this be done?

Also, anyone know of one source where I can get detailed information on how to best use Web Apps and all of it's possibilities and limitations? Most of the tutorials that I have seen so far say that you can do most anything with Web Apps; however, the tutorial examples leave a lot of questions unanswered. I saw that Adobe has an article that shows how to build a basic web app and that it is "part 1" in a series. Anyone know where to find parts 2, 3, etc?

Thanks,

TOPICS
Web apps

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 23, 2012 Apr 23, 2012

Copy link to clipboard

Copied

Hi there,

Good day, i hope this will give you some ideas

for example this is your html

<input type="checkbox" name="test" value="1">1

<input type="checkbox" name="test" value="2">2

<input type="checkbox" name="test" value="3">3

<input type="checkbox" name="test" value="4">4

and this is your jquery script

<script type="text/javascript">

jQuery("input@[name='test']").click(function() {

    var istrue = jQuery(this).is(":checked");

    if(istrue == true) {

        var urvalue = jQuery(this).val();

        alert(urvalue);

    }

});

</script>

hope this helps you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 23, 2012 Apr 23, 2012

Copy link to clipboard

Copied

LATEST

Needs to be more then that through hey,

It also needs to run onChange as well to cover someone changing their mind.

You also neeed a hidden custom field on the form to output the result so it comes through to the form.

I will see what I can whip up later today if no one has given you an example to cover all your requirements

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines