|
| |
|
|
dreamsofwillow
Posts: 20 Joined: 6/11/2003 Status: offline
|
Adding checkbox totals - 6/29/2003 15:01:37
Hi I have a inserted a checkbox in my DRW when i call all my products in my database table. Named the checkbox <%=FP_FieldURL(fp_rs," ProductNo" )%> Not sure if this is right. Also in the DRW is the price of each product. I have then a Amount textbox also inserted in my DRW. Outside my DRW ive made one texbox (subtotal)---> to calc the subtotal of all the products. I want to multiply price * amount to get subtotal... have this code:
var NoRecordsChecked = true;
for(i=0;i<document.FrontPage_Form1.elements.length;i++)
{
if(document.FrontPage_Form1.elements.checked)
{
document.FrontPage_Form1.subtotal.value = document.FrontPage_Form1.Price.value * document.FrontPage_Form1.AmountOrdered.value;
NoRecordsChecked = false;
}
}
if(NoRecordsChecked)
{
alert(" No Products Selected" )
return;
}
How do i calculate the subtotal depending on which product is selected via the checkbox? Dreams
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|