Great Ideas. Always Flowing.

We are not happy until you are happy. Client satisfaction guaranteed. Whatever your needs and requirements, we have the skills and resources for the job!

Quick login...


Or... now make it easy with Facebook Integration
Connect via Facebook



Top Sellers

Frustrated over the lack of customization for your user's registration fields? Dynamically setup your DNN Portal with custom registration fields, layout, questions, and other core integration options......

Ultra Video Gallery is a brother product of Ultra Media Gallery, UVG allows you to upload videos in various format and automatically encode them to flv or H264 format, you also can add videos from internet or record live videos from your webcam.

Build high performance, completely customizable data-entry forms and views driven by your DNN and external databases. New built-in tools make it a snap to quickly create data entry forms, data views, and even database tables. Plus, add your own HTML, CSS, Javascript, SQL commands, stored procedures,

The most advanced DotNetNuke shopping cart on the planet. Easy to use e-Commerce, Secure Shopping Cart Software and SEO friendly. B2C / B2B Ecommerce Sites.

One stop solution for events calendar and events registration! FREE DOWNLOAD is available now!

Cant' get fields to total
Last Post 05-30-2012 06:32 AM by Dan C.. 6 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
SKUser is Offline
going with the flow
going with the flow
Posts:61
Avatar

--
05-29-2012 01:14 PM
    I have three fields:
    SchoolAttendance - combo box with 4 Options, each option has a Value of 1, 2, 3 or 4

    InfoMeeting - combo box with 4 Options, each option has a Value of 1, 2, 3 or 4

    Total  - Text/HTML


    In the Client Side event for SchoolAttendance and InfoMeeting I've place the following, per the instructions in Demo 20, "Note that the same calculation should be added to the client-side event both the Fee1 and the Fee2 field. "

    $(Total) = parseInt($(SchoolAttendance)) parseInt($(InfoMeeting)); document.getElementById('Total').innerHTML = 'Your total comes to: ' formatCurrency($(Total)) '';

    I have two problems:

    I have "No Default Value" checked, yet the top item on the list appears as what appears to be the default.

    When selecting on option on the drop down, the Total does not calculate. 

    The Total field's client side event is blank.

    What am I missing?


    SKUser is Offline
    going with the flow
    going with the flow
    Posts:61
    Avatar

    --
    05-29-2012 03:56 PM
    This is what I'm using on in the Client Side events:

    {$(TotalbyQuantity) = (parseInt($(SchoolAttendance) ) + ($(InfoMeeting) )); document.getElementById('Total').innerHTML = (parseInt ($(SchoolAttendance))+($(InfoMeeting) )); }


    Something is wrong with my syntax because I can get 22 when I should be getting 4.

    It's combining the values instead of adding them.

    What I'm missing?



    Dan C.User is Offline
    river guide
    river guide
    Posts:82
    Avatar

    --
    05-29-2012 05:58 PM
    I prefer parseFloat versus parseInt but change if you prefer. create a hidden field: hidden_total update existing formula: {$(TotalbyQuantity) = (parseFloat$(SchoolAttendance) ) +parseFloat($(InfoMeeting) )); } {$(hidden_total)=(parseFloat($(SchoolAttendance))+parseFloat($(InfoMeeting) )).toFixed(2); } {document.getElementById('Total').innerHTML = 'Your total here comes to: ' +formatCurrency($(hidden_total));} ignore curly braces ofcourse hope this works typing on the ipad stinks. make sure this syntax is on each qty field.


    SKUser is Offline
    going with the flow
    going with the flow
    Posts:61
    Avatar

    --
    05-30-2012 04:53 AM

    Thanks Dan. I'm still missing something.

    The hidden field in the form is: TotalbyQuantity.

    The HTML field is: Total 

    {$(Total) = (parseFloat($(SchoolAttendance) ) +parseFloat($(InfoMeeting) )); }

    {$(TotalbyQuantity)=(parseFloat($(SchoolAttendance))+parseFloat($(InfoMeeting) )).toFixed(2); }

    {document.getElementById('Total').innerHTML = 'Your total here comes to: ' +formatCurrency($(TotalbyQuantity));}

    You mentioned to to ignore the curly braces... I don't understand that. I thought they were required.

    Thanks



    Dan C.User is Offline
    river guide
    river guide
    Posts:82
    Avatar

    --
    05-30-2012 05:28 AM
    I recreated the form on a test site and updated the syntax using the parseInt with the checkbox as you originally had.  I attached the form I created for your review.

    {$(Hidden_Total)=(parseInt($(SchoolAttendance))+parseInt($(InfoMeeting))).toFixed(2); }

    {document.getElementById('Total').innerHTML = 'Your total here comes to: ' +formatCurrency($(Hidden_Total));}

    You do not want to use curly braces, just in the forum to keep the HTML editor from interpreting them as code which then strips out pieces as it renders.

    Also set the hidden total default to zero.

    Let me know if this works for you.
    (make sure to use ctrl+f5 to clear browser cache when making changes to java.

    I will also add a checkbox field (temporarily) and include the alert function for each field: {alert($(SchoolAttendance))}. This will create a pop-up showing the value of each field at the time you check the checkbox.

    Hope this helps.

    content.DynamicForms.SKschoolform.zip

    SKUser is Offline
    going with the flow
    going with the flow
    Posts:61
    Avatar

    --
    05-30-2012 06:15 AM
    Dan thank you ... this helped tremendously.


    Dan C.User is Offline
    river guide
    river guide
    Posts:82
    Avatar

    --
    05-30-2012 06:32 AM
    Your welcome - please review this brief post.
    http://www.datasprings.com/dnn-modu...uantities/

    Do you think this feature would have helped you in this challenge?
    If yes or no, please sound off.

    Thanks,
    Dan


    You are not authorized to post a reply.


     
     

    Join our mailing list...

    Get current news and events the easy way
    Subscribe Me

    Recent Blogs...

     
    Copyright 2005 - 2011 by Data Springs, Inc.
     
  • 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