Hi martijn,

Thx for your reply i found 
http://www.pengoworks.com/workshop/jquery/calculation/calculation.plugin.htm
and that is exactly what i need. The same idea as what you are saying.

Erwin

On 16 mrt, 14:56, Martijn Houtman <martijn.hout...@gmail.com> wrote:
> On Mar 16, 2009, at 2:46 PM, ebru...@gmail.com wrote:
>
> > I am working on a order form. I now have the following:
> > *snip*
>
> > would change in the total price of all the products.
>
> > Any one how can assist me in this?
>
> What I would do is give the <table> an id, such as "price_table",  
> give each table row which contains an object a class "object" or  
> something (anything that stands out), then give each price <div> a  
> class, such as "object_price", and each quantity another class, such  
> as "object_quantity". Then do something like:
>
> var price = 0;
> $("#price_table > tr.object").each(function() {
>         price += parseFloat(this.find("div.object_price").html()) * parseInt
> (this.find("div.object_quantity").html());});
>
> $("#total_price").html(price);
>
> You get the general idea: use structured HTML, which makes it easy to  
> traverse/parse it.
>
> Regards,
> --
> Martijn.

Reply via email to