|
|||
Total form looping textfield
Code:
function hazardL ()
{
var eq = new Array ();
var price = new Array ();
var hz = new Array ();
for (b=1;b<=19;b++) {
eq[b] = parseFloat(document.form1['e'+b+''].value);
price[b] = parseFloat(document.form1['lp'+b+''].value);
hz[b] = eq[b] * price[b];
document.form1['hzL'+b+''].value = hz[b].toFixed(2);
a += hz[b]; //This is the problem
document.form1.sbA.value = a.toFixed(2);
from this loop, i want to add all the hz[b] total for example hz[1] + hz[2] untill hz[19]. can anyone show me what's wrong with the code ? |
|
|||
Quote:
i donno += is a valid JS syntax... try a = a + hz[b]
__________________
Venzon Solution Services |
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Total newbie here >_< | Pip_X | Website Programming | 2 | 12-04-2006 01:12 PM |
| Count total of records | jeb23 | Website Programming | 17 | 04-02-2004 07:15 PM |
| PHP FrameWork For TOTAL NEWBIE | bazet | Website Programming | 13 | 02-12-2002 04:19 PM |
| looping the soundzz | min_ah | Website Design | 19 | 13-05-2002 09:42 AM |
| looping problem in IE ? | kelly001 | Website Design | 1 | 01-05-2002 12:25 AM |
All times are GMT +8. The time now is 03:06 AM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.












Linear Mode

