girish_327
Posts: 108
|
| Posted: 10/18/2007, 7:58 AM |
|
Hello ALL,
I saw your Post on CCS Forum. I thought you might be the one who could help me. I need to calculate some figures in Editable Grid on change. I used following code
But Its not working or giving me error
Error: unit_secondary_listElements is not defined
Source File: http://localhost/GWA_NEW/GWA/Add_Qty.php?unit_id=23
Line: 25
I like to calculate Each Row with following caluclations may be in OnLoad or OnChange Event
Please HELP me.
Thanks in Advance
<script language="JavaScript">
function StrToFloat(str)
{
if (str.indexOf(",") != -1) {
str = str.replace(",",".");
}
var result = parseFloat(str);
if (isNaN(result)) {
result = 0.0;
}
return result;
}
function Show_Total()
{
var TotalSum=0;
var Summ;
for(var i=0; i<unit_secondary_listElements.length;i++){
Summ = StrToFloat(unit_secondary_listElements[unit_secondary_listpriceID].value) *
StrToFloat(unit_secondary_listElements[unit_secondary_listquantityID].value);
}
}
</script>
_________________
Girish Baraskar
Web Designer/Developer
http://www.agnisdesigners.com
http://www.eindianpaintings.com
http://www.realestatekolhapur.com |
 |
 |
|