Checkbox, Values and Roles
Last Post 11-14-2009 05:55 PM by David To. 3 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Dan StaufferUser is Offline
going with the flow
going with the flow
Posts:68
Avatar

--
11-13-2009 01:42 AM

    I am using a Checkbox List to allow users to subscribe to 3 individual roles and pay a fee for each role.  At the same time I am using the Demo 14 and 20 method to calculate fees.  This sets the Checkbox Item Value to the to cost of the item. The values are used to calculate the total.  Calculating the total works fine.

    Here is the issue.  All my costs are the same and therefore, the checkbox item values are the same.  When my completion events adding users to the role designated by the check box, it fires for all 3 roles rather than just the one selected.

    2 reasons for this post.

    1. FYI for others.
    2. Get Suggestions - I am sure I can figure something out.  Just wondered if anyone has a simple solution.

    Thanks, Dan

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    11-13-2009 06:05 AM
    HI, since your values are the same in the checkbox list, you may need to apply javascript instead. What you want to do is right click on t he checkbox list and choose "Inspect Property" in the browser to obtain the element ID.

    Create a hidden field and use client side javascript on the checkbox list to set the hidden field value to the selectedindex of the checkbox list, something like:

    $(hiddenfield) = document.getElementById('elementID').selectedindex

    Then create 3 completion events based on the hiddefield value to apply your roles. Hope this helps. Try it out and be sure to use Firebug with Firefox to check javascript error / issue. -- David
    Dan StaufferUser is Offline
    going with the flow
    going with the flow
    Posts:68
    Avatar

    --
    11-14-2009 03:59 AM

    Thanks David.
    I am a little confused by choose "Inspect Property" in the browser. I am unfimiliar with this. Can I see the elementID via view source or am I missing something?

    Does it matter that a user can select any or all of the 3 roles and will be added to one to three roles depending on their selection and pay $20 for each of the roles selected?  Or, would this be easier to use seperate fields for each available selection?

    Thanks, Dan

    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    11-14-2009 05:55 PM
    Yes, you can find the element ID by viewing the source but it's a lot easier to right click on the field and choose "Inspect Element" when using Google Chrome or IE,etc. -- David


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi