How do I show the answer to this in a box??
function multiply()
{
if(total < 10000)
{
commission = total * 0.001;
}
else
{
commission = total* 0.0008;
}
if (commission<5) commission =5;
var total_commission =commission + total;
document.getElementById("commission").value = total_commission;
}
{
if(total < 10000)
{
commission = total * 0.001;
}
else
{
commission = total* 0.0008;
}
if (commission<5) commission =5;
var total_commission =commission + total;
document.getElementById("commission").value = total_commission;
}
Jignesh TrivediPosted Mar 16, 2015, 12:26 AM
Hi,
I think your code is correct to show the value on page using js.
This is depending upon type of element "commission"...
If it is label then use...
document.getElementById("commission").InnerHTML = total_commission;
hope this will help you.
Khargesh RajputPosted Mar 15, 2015, 2:10 AM