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!

How to Convert Text to Number When Comma's are entered
Last Post 07-02-2013 05:47 AM by Ryan Bakerink. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
lbryantUser is Offline
new to the springs
new to the springs
Posts:3
Avatar

--
07-02-2013 04:17 AM
    I have the following script in the Client Side event for a grand total.  Everything works great until we had a user enter values in our text boxes with commas.  Now the grand total won't calculate right.  

    How do I edit the formula to ensure if a user does/doesn't enter a value in a text box with a comma that the grand total will still display correctly?

    $(GrandTotalHidden) = formatCurrency(eval(parseFloat($(Wheat)) + parseFloat($(Seed)) + parseFloat($(LPG)) + parseFloat($(Corn)) + parseFloat($(Chemicals)) + parseFloat($(Petroleum)) + parseFloat($(SoyBeans)) + parseFloat($(Feed)) + parseFloat($(Hardware)) + parseFloat($(MiloSorghum)) + parseFloat($(Fertilizer)) + parseFloat($(LivestockPoultry)) + parseFloat($(Oats)) + parseFloat($(Lumber)) + parseFloat($(Barley)) + parseFloat($(DieselFuel)) + parseFloat($(Other)) + parseFloat($(Other2))))
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    07-02-2013 05:47 AM
    Hello,

    You'll need to do 1 of the two things:

    1.) Strip out all non-numeric information when inputted by user using JavaScript

    or

    2.) Inside of your calculation, use a replace statement to remove all commas


    This blog post has a JavaScript function that searches for single and double quotes and replaces it with other characters.
    http://www.datasprings.com/news/blo...ble-quotes

    You can re-use this function, to look for commas and replace with nothing(which will act as just removing the comma).

    You need to focus on stripping any non-numeric characters from your values before beginning calculating.

    Please let us know if you have any questions.

    Thanks,

    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