House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

javascript addition

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

javascript addition

Very good point Isaac!..   .) John Ensign 07/23/2002 04:42 PM
JavaScript is case sensitive, so that should be parseInt() rather than Chris Lofback 07/23/2002 02:56 PM
You might try adding a ParseInt() function around the value as well: Tim Painter 07/23/2002 02:41 PM
----- Excess quoted text cut - see Original Post for more ----- S. Isaac Dealey 07/23/2002 02:22 PM
IMHO... John Ensign 07/23/2002 01:08 PM
Use the function eval() with each textbox value: Matthew R. Small 07/23/2002 12:50 PM
Hello, Tim Do 07/23/2002 12:41 PM

07/23/2002 04:42 PM
Author: John Ensign Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:14269#73922 Very good point Isaac!..   .) ---- John ----- Excess quoted text cut - see Original Post for more ----- Hey John, most of the time I agree with you... that is, when you're just summing up values that a user has given you and getting whatever total they produce, i.e. for a mortgage app where the user enters their financial info and all you want to know is their total annual income for their application. The exception is when the user is entering values which must add up to a given total which is required by some other external mechanism, i.e. in a grade-weighting schedule for an electronic report-card where grades for different types of assignments may be weighted differently, but the sum of all wieghts must add up to 100 ( making each point in the weighting schedule exactly 1% ). In order to calculate the percentage, you have to know the total points, so if you want to double-check the teachers to make sure their math adds up, you can enforce a 100pt total and you know that if their numbers don't add up to exactly 100 they need to check their math and make an adjustment. I _think_ he may be doing something similar to this, although I'm not certain of that... Isaac Dealey www.turnkey.to 954-776-0046
07/23/2002 02:56 PM
Author: Chris Lofback Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:14269#73882 JavaScript is case sensitive, so that should be parseInt() rather than ParseInt(). Chris Lofback Sr. Web Developer TRX Integration 28051 US 19 N., Ste. C Clearwater, FL  33761 www.trxi.com You might try adding a ParseInt() function around the value as well: e.g. ParseInt(document.newBillingInfo.SCEPbilledAmount.value) + ParseInt(document.newBillingInfo.SCEPpenaltyAmount.value) etc... Tim P. ----- Excess quoted text cut - see Original Post for more -----
07/23/2002 02:41 PM
Author: Tim Painter Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:14269#73876 You might try adding a ParseInt() function around the value as well: e.g. ParseInt(document.newBillingInfo.SCEPbilledAmount.value) + ParseInt(document.newBillingInfo.SCEPpenaltyAmount.value) etc... Tim P. ----- Excess quoted text cut - see Original Post for more -----
07/23/2002 02:22 PM
Author: S. Isaac Dealey Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:14269#73873 ----- Excess quoted text cut - see Original Post for more ----- Hey John, most of the time I agree with you... that is, when you're just summing up values that a user has given you and getting whatever total they produce, i.e. for a mortgage app where the user enters their financial info and all you want to know is their total annual income for their application. The exception is when the user is entering values which must add up to a given total which is required by some other external mechanism, i.e. in a grade-weighting schedule for an electronic report-card where grades for different types of assignments may be weighted differently, but the sum of all wieghts must add up to 100 ( making each point in the weighting schedule exactly 1% ). In order to calculate the percentage, you have to know the total points, so if you want to double-check the teachers to make sure their math adds up, you can enforce a 100pt total and you know that if their numbers don't add up to exactly 100 they need to check their math and make an adjustment. I _think_ he may be doing something similar to this, although I'm not certain of that... Isaac Dealey www.turnkey.to 954-776-0046
07/23/2002 01:08 PM
Author: John Ensign Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:14269#73859 IMHO... In terms of interface design, its easier to auto-calc amounts, then you kind of take out the human element... And if youre involving 10 fields for some kind of calculation, and the value "they" enter is wrong, how do you point to the incorrect amount in the appropriate field? (assuming youve already set limits, and checked to make sure the values, if numeric, are within that range). Its simpler to auto calc it for them.  Although, you should also recheck the math on the server by re-calculating the field amounts again, just to be sure. ) hope any of this helps, John Ensign Hello, Can anybody show me how you would I would validate the sum of several text boxes?  This is what I'm trying to use but not having luck.. thanks in advance. function validate() { if (document.newBillingInfo.SCEPbilledAmount.value + document.newBillingInfo.SCEPpenaltyAmount.value + document.newBillingInfo.SCEPdelinquentAmount.value != document.newBillingInfo.SCEPtotalAmount.value)   {     alert("The total Billing amount does not add up correctly, Please check the values.")     document.newBillingInfo.SCEPbilledAmount.focus()     return false;   }   return true; }
07/23/2002 12:50 PM
Author: Matthew R. Small Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:14269#73853 Use the function eval() with each textbox value: Eval(document.newBillingInfo.SCEPbilledAmount.value) - Matt Small Hello, Can anybody show me how you would I would validate the sum of several text boxes?  This is what I'm trying to use but not having luck.. thanks in advance. function validate() { if (document.newBillingInfo.SCEPbilledAmount.value + document.newBillingInfo.SCEPpenaltyAmount.value + document.newBillingInfo.SCEPdelinquentAmount.value != document.newBillingInfo.SCEPtotalAmount.value)   {     alert("The total Billing amount does not add up correctly, Please check the values.")     document.newBillingInfo.SCEPbilledAmount.focus()     return false;   }        return true;    }
07/23/2002 12:41 PM
Author: Tim Do Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:14269#73850 Hello, Can anybody show me how you would I would validate the sum of several text boxes?  This is what I'm trying to use but not having luck.. thanks in advance. function validate() { if (document.newBillingInfo.SCEPbilledAmount.value + document.newBillingInfo.SCEPpenaltyAmount.value + document.newBillingInfo.SCEPdelinquentAmount.value != document.newBillingInfo.SCEPtotalAmount.value)   {     alert("The total Billing amount does not add up correctly, Please check the values.")     document.newBillingInfo.SCEPbilledAmount.focus()     return false;   }        return true;    }
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference