Hello I have a function like this
function checkquantitiy( quantitiy){
if(quantitiy.va lue != parseInt(quanti tiy.value)) {
alert(quantitiy .value+" sorry not integer quantitiy");
}
} //End of function
This check if quantitiy is integer. In the form I have following
<input name="buyquanti tiy" type="hidden" id="buyquantiti y" value="<?php echo
$buyquantitiy; ?>" size="1" maxlength="3">
<input name="quantitiy " type="text" id="quantitiy" value="1" size="1"
maxlength="3" onchange="javas cript:return checkquantitiy( this);">
The problem is when i will calculate if quantitiy/buyquantitiy is an
integer. The reason is that some products can only be seld as 4 items, and
if you press 3 wou should get a message that says
"Sorry a quantity of 3 are not aviable because there are 4 items in
package". Can transfer 2 varibales into the function? Or have anyone any
suggestion how to solve this.
Terje
function checkquantitiy( quantitiy){
if(quantitiy.va lue != parseInt(quanti tiy.value)) {
alert(quantitiy .value+" sorry not integer quantitiy");
}
} //End of function
This check if quantitiy is integer. In the form I have following
<input name="buyquanti tiy" type="hidden" id="buyquantiti y" value="<?php echo
$buyquantitiy; ?>" size="1" maxlength="3">
<input name="quantitiy " type="text" id="quantitiy" value="1" size="1"
maxlength="3" onchange="javas cript:return checkquantitiy( this);">
The problem is when i will calculate if quantitiy/buyquantitiy is an
integer. The reason is that some products can only be seld as 4 items, and
if you press 3 wou should get a message that says
"Sorry a quantity of 3 are not aviable because there are 4 items in
package". Can transfer 2 varibales into the function? Or have anyone any
suggestion how to solve this.
Terje
Comment