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!

Simple Calculations
Last Post 05-15-2009 06:20 AM by David To. 12 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
erik hindsUser is Offline
going with the flow
going with the flow
Posts:29
Avatar

--
04-27-2009 04:10 AM

    Trying to do a simple calculation (quantity * price). The Quantity is a text field, the price is a label. I want to display (dynamically) the Total in a label field.

    in the Quantity field client side event I have

    $(Total) = $(Price) * $(Quantity).

    Am I going about this in the right way?

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

    --
    04-27-2009 06:46 AM

    HI, for your case, you should consider checking out our Form Demos 20 which shows client side calculations. This example should enable you to see the calculated total in a TEXT/HTML label field. -- David

    erik hindsUser is Offline
    going with the flow
    going with the flow
    Posts:29
    Avatar

    --
    04-27-2009 06:53 AM

    Thanks. Those are good examples. Unfortunatley what I'm trying to do is multiple products with quanties, which isn't covered by the examples.

    Product 1 [checkbox] Qty: [textbox]

    Product 2 [checkbox] Qty: [textbox]

    Product 3 [checkbox] Qty: [textbox]

    Total: [label or html]

    [Purchase]

    CandaceUser is Offline
    river guide
    river guide
    Posts:2431
    Avatar

    --
    05-08-2009 08:57 AM

    Hi Erik,

    Jarrod's Form over at www.betasprings.com may be similar to what you're trying to achieve (log in as host / dnnhost).  Check out his client-side event under Advanced Field Options.  You'll probably need several hidden product total field then sum them all up for the grand total which will be passed to your payment gateway.  Thanks!

    Candace

    erik hindsUser is Offline
    going with the flow
    going with the flow
    Posts:29
    Avatar

    --
    05-13-2009 10:56 AM

    Candace -

    I ended up using a series of dropdownlists with the prices set for the value (1=10.00, 2= 20.00).

    I have some trouble calculating the total. I have a field named "total" which is a read only text box. Upon selecting my quantity for each item, it calculates and I can see the amount appear in the textbox. I have two problems

     

    1. I cannot get it to display in the innerHtml of a Custom HTML field like in the examples. Here is my client script for each of my dropdownlists:

    $(total) = parseFloat($(QProd1)) + parseFloat($(QProd2)) + parseFloat($(QProd3)) + parseFloat($(QProd4)) + parseFloat($(QProd5)) + parseFloat($(QProd6)) + parseFloat($(QProd7)) + parseFloat($(QProd8));

    GrandTotal.innerHTML = 'Your grand total comes to:  ' + formatCurrency($(total)) + '';

     

    2. I cannot pass the total into PayPal by using $(total). Here is my PayPal parameters:

    &item_name=MOFAS&currency_code=USD&amount=$(total)&no_shipping=1&first_name=$(FirstName)&last_name=$(LastName)&email=$(Email)

    Why am I having problems with my total field?

     -Thanks

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

    --
    05-13-2009 12:22 PM
    You will need to add the following to your innerhtml. So it would be:
    document.getElementbyId('GrandTotal').innerHTML = 'Your grand total comes to: ' + formatCurrency($(total)) + '';

    Did you put your javascript into the initial page load as well as the client side event? What is it showing up in paypal? -- David
    erik hindsUser is Offline
    going with the flow
    going with the flow
    Posts:29
    Avatar

    --
    05-13-2009 12:41 PM

    the javascript is in the client events for the control only. Paypal shows nothing for the amount. If I use a static amount, like amount=1.00 it shows up as a dollar.

    The code you gave me doesn't work either. nothing shows up for the grand total.

     

    Thanks

     

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

    --
    05-13-2009 12:51 PM
    What is the ID name of your innerHTML? Is it GrandTotal or something else? -- David
    erik hindsUser is Offline
    going with the flow
    going with the flow
    Posts:29
    Avatar

    --
    05-13-2009 12:53 PM
    The custom html field is named GrandTotal
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    05-13-2009 01:01 PM
    HI Erik, I need to know the ID=' ' in your innerhtml. When you're in the Rich Text Editor, switch over to Source view to see what it is. -- David
    erik hindsUser is Offline
    going with the flow
    going with the flow
    Posts:29
    Avatar

    --
    05-15-2009 03:57 AM

    <div id="dnn_ctr504_DynamicForms_Label_759b9fb2-4685-4116-9ff0-fc86dbcd032e_lblLabel" class="Normal" blursave="0" nsprefix="dnn$ctr504$DynamicForms$Label_759b9fb2-4685-4116-9ff0-fc86dbcd032e" tbid="tbDynamicH" callback="dnn.xmlhttp.doCallBack('lblLabel dnn_ctr504_DynamicForms_Label_759b9fb2-4685-4116-9ff0-fc86dbcd032e_lblLabel','[TEXT]',this.callBackSuccess,this,this.callBackFail,this.callBackStatus,null,null,1);" richtext="1" multiline="1" eventname="none" cssover="LabelEditOverClassML" cssedit="LabelEditTextClass" sysimgpath="images/" title="

    &#160;Grand Total

    ">

    <p> Grand Total:p>
    div>

     

    erik hindsUser is Offline
    going with the flow
    going with the flow
    Posts:29
    Avatar

    --
    05-15-2009 03:58 AM
    Also, I still can't pass the value to PayPal. What am I doing wrong there? Would it be easier to send the form to you?
    David ToUser is Offline
    river guide
    river guide
    Posts:2719
    Avatar

    --
    05-15-2009 06:20 AM
    Hi Erik, I sent you email so that you can reply and send me your XML file for me to debug.-- David
    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