Help with Demonstration 20
Last Post 06-17-2013 09:52 AM by lbryant. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages Resolved
lbryantUser is Offline
new to the springs
new to the springs
Posts:3
Avatar

--
06-17-2013 05:26 AM
    Good Morning,

    I've been trying to replicate Demonstration 20 on our website and I'm missing some key piece(s).

    We have 5 text boxes Wheat, Seed, Corn, Feed and Beans.  Each have the following code in the Client Side Event section of the Advance Field Option with their respective "Short Name" label

     {
    if(isNaN($(Wheat))){
    $(Wheat) = '0';
    }

    $(GrandTotalHidden) = formatCurrency(eval(parseFloat($(Wheat)) + parseFloat($(Seed)) + parseFloat($(Corn)) + parseFloat($(Soy Beans)) + parseFloat($(Feed))))


    I created a Hidden Grand Total labeled "GrandTotalHidden" as the Short name with the following code in it's Client Side Event:

    $(GrandTotalHidden) = formatCurrency(eval(parseFloat($(Wheat)) + parseFloat($(Seed)) + parseFloat($(Corn)) + parseFloat($(Soy Beans)) + parseFloat($(Feed))))

    For troubleshooting reasons I've unhidden the field and when I enter a value in any of the textboxes, I never get a value in my Grand Total field.

    Can you point me in the right direction of what I need to update?  Thanks for your assistance.

    Lindsey
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    06-17-2013 08:04 AM
    Hi Lindsey,

    Thanks for posting your question... The best advice I could give would be to:

    1. Take this in small pieces at a time, such as one specific calculation / addition and then make sure its working.

    2. Enable Debug Mode on the form and make sure all of the $(Fields) are getting replaced with the actual JavaScript ID.

    3. Enable something such as "FireBug" for FireFox. This will spit out any specific errors that are firing. You will want to enable "Console" and refresh the page once that feature is enabled.


    Thanks,

    Chad
    lbryantUser is Offline
    new to the springs
    new to the springs
    Posts:3
    Avatar

    --
    06-17-2013 09:52 AM
    Thanks Chad, your first line of advice was the solution.

    To anyone else that is looking at this example I would recommend the following checkpoints:

    1. Reference the "Short Field" in your grand total line.
    2. Take any spaces out between multiple words
    3. I assigned the "0" as my default value and then just put the grand total line in the client actions of each of my text fields. I'm only summing text fields so that might be why this worked.



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