Calculate total based on radio buttons
Last Post 07-24-2013 05:54 AM by Ryan Bakerink. 4 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
hpascuaUser is Offline
new to the springs
new to the springs
Posts:3
Avatar

--
08-19-2010 06:20 AM
    I need to calculate the total based on radio button selection. 

    I set-up the radio buttons and inserted this in Client side event:

    document.getElementById('Total').innerHTML = 'Your total comes to:  ' '$' funcRadioCalc($(Fees_FieldID)) '';

    $(TotalRadio) = funcRadioCalc($(Fees_FieldID))

    Then I created an html field and added the div tag (id=Total) to the source within the Rich Text Editor.

    Nothing works -- what step(s) am I missing?  Thanks.
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    08-19-2010 07:26 AM
    Hello,

    Have you referred to our demonstration? Everything looks correct but a reason that it's not working could be that you have a syntax error or a javascript error. Can you make sure that everything is syntactically correct?

    Thanks,

    Ryan
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    08-19-2010 09:17 PM
    I would also install FireBug for FireFox... This is a very useful tool for finding out why the specific JavaScript doesn't work or throws an error.

    -Chad
    venus8887User is Offline
    new to the springs
    new to the springs
    Posts:1
    Avatar

    --
    07-19-2013 08:08 AM
    Dear Rayan ,
    Hi , I have created an evaluation form with dynamic form module in dotnetnuke .
    I used radio buttons with values , now i want to sum the values and put the result in textbox , i read demonstration 20 but as i am beginner , I still have problem in writing javascript code .
    thanks for your help
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    07-24-2013 05:54 AM
    Hello.

    What is the shortfieldname of your Textbox? And what's the shortfieldname of your Radio Button List?

    Let's pretend the shortfieldname for your Textbox is "GrandTotal". And your Radio Button List shortfieldname is "Products"

    So inside of your Radio Button list in Dynamic Forms, you'll want to navigate to Advanced Question Options -> Client Side and provide the following jQuery:


    $(GrandTotal) = funcRadioCalc($(Products_FieldID));


    Then save your Radio Button list. Please let me know if the totaling occurs when making selections from your Radio Button list?

    Let me know if you have any questions.

    Thanks,

    Ryan






    ---
  • 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