G
Galsaba
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=P11
}
else
{
if (document.form1.quantity.value>5)
{
document.form1.amount.value=P6
}
else
{
document.form1.amount.value=P1
}
}
}
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=P11
}
else
{
if (document.form1.quantity.value>5)
{
document.form1.amount.value=P6
}
else
{
document.form1.amount.value=P1
}
}
}