Hi Eric:

give this a try:

<input type="text" name="d_price#nextc#" size="6" maxlength="6" value="0.00"
onchange="updatetotal(this.value);" />

function updatetotal(n) {
     newtotal = newtotal + n;
}

you may need to do a parseFloat() around the n if you have problems with the
values concatenating instead of adding.

hth,
charlie

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, August 11, 2003 12:06 PM
Subject: Quick CF/Javascript ?


> This is probably real easy...just need to update via javascript the total
of
> the form when a field is changed...here's what I have in the looping for
the
> fields...
>
> <td class="MainContent" align="center" width="100"><!---Price
Override---->
> <input type=text name="d_price#nextc#" size=6
> maxlength=6 value="0.00" onChange="updatetotal(this);"></td>
>
> And the javascript...have to use some kind of "this" function to get it to
> update correctly???
>
> function updatetotal() {
> newtotal = newtotal + this
>
> }
>
> TIA!!
>
> Regards,
>
> Eric J. Hoffman
> Technology Tamer
> DataStream Connexion
> www.datastreamconnexion.com
>
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to