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!

Javascript - Price Totals updating issue
Last Post 01-07-2013 01:35 PM by Ryan Bakerink. 3 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
K StoneUser is Offline
new to the springs
new to the springs
Posts:2
Avatar

--
01-07-2013 06:13 AM
    Hi all,

    I'm looking for some help on a form I've been building. The form lists the items and their description a visitor can select from a "Session" the visitor picks from a separate page. The visitor can select (via combo box) the quantity of each item and each item has a specific price, which I am drawing from a table on our database with SQL. As-is, I'm using client side javascript close to that used in Demo 20 to total the prices of the items.

    However, one function of my form has created a few roadblocks for me. The number of items offered for any given Session might vary. I have 20 possible item fields that can be filled and currently, I've set up question events to hide the excess fields if the number of items offered for a Session is less than 20. (10 items will show 10 fields, 15 shows 15, etc.) I've had to wrestle with the client side javascript, as I was using the 'Quantity' combo box as part of the javascript, but once one of the fields are hidden, the javascript is broken since the hidden Quantity boxes essentially don't exist.

    I did find a workaround by having the Quantity boxes pass their amounts to hidden fields, then using the hidden fields in the javascript instead.

    So here's the issue I'm having (apologies for the lengthy explanation, I didn't want to leave out anything important):

    The javascript works perfectly fine: Quantity combo boxes are passing their values to hidden quantity fields; those hidden quantity fields are multiplied by the hidden price fields for each item and then added up. The only problem I have is that the text/html field I have with the total now does not update. If I have the hidden quantity fields changed to text boxes and I click on the text box once the combo box has passed the value to it, the total updates -- but if I only click on and change the combo boxes, the total doesn't update.

    I've tried adding onclick, onblur, onchange and a few other event objects to the shortnames of both the Quantity combo boxes and the Quantity hidden fields, but this doesn't seem to work. Am I missing something, or is there another way to go about this? Everything works except for updating the total in the Text/html field.

    Some guidance would be greatly appreciated!

    Thanks in advance,
    Kate S.
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    01-07-2013 11:07 AM
    Hello Kate,

    You'll want to provide the same JavaScript in the On Client Side sections for any fields that are involved in a calculation.

    If you have any postbacks enabled on your form(Question Events), then provide the same JavaScript calculation under Module Configuration -> Advanced Coding Options -> Custom JavaScript file -> Initial JavaScript.

    If you're updating labels, be sure to use:

    document.getElementById('ID of label goes her').innerHTML = 'LABEL YOU WISH TO USE';

    Please let me know if you have any questions.

    Thanks,

    Ryan
    K StoneUser is Offline
    new to the springs
    new to the springs
    Posts:2
    Avatar

    --
    01-07-2013 11:28 AM
    Ryan,

    Thanks for the speedy reply. It never occurred to me to put the Javascript for the calculation into the Quantity combo boxes... Works like a charm now!

    Thanks much!
    Kate S.
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    01-07-2013 01:35 PM
    Glad that I could be of assistance.

    Let us know if you ever have any questions.

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