I want to use checkForm function for 10 forms I have.
form1, form2....., form10.
How can I pass argument to
....
if (document.formX .quantity.value >10)
....
(formX will be form1 or form2, ...or form10 etc.)
function checkForm(P1,P6 ,P11)
{
if (document.form1 .quantity.value >10)
{
document.form1. amount.value=P1 1
}
else
{
if (document.form1 .quantity.value >5)
{
document.form1. amount.value=P6
}
else
{
document.form1. amount.value=P1
}
}
}
Thanks,
Joe
form1, form2....., form10.
How can I pass argument to
....
if (document.formX .quantity.value >10)
....
(formX will be form1 or form2, ...or form10 etc.)
function checkForm(P1,P6 ,P11)
{
if (document.form1 .quantity.value >10)
{
document.form1. amount.value=P1 1
}
else
{
if (document.form1 .quantity.value >5)
{
document.form1. amount.value=P6
}
else
{
document.form1. amount.value=P1
}
}
}
Thanks,
Joe
Comment