Click to See Complete Forum and Search --> : floor function undefined error..


vicpal25
06-02-2005, 01:40 PM
AWRRGHH...WHY IS ISNT THE FOLLOWING FUNCTION RECOGNIZING THE FLOOR():

<script Language="JavaScript">


function formvalidation(){
var quantity=parseInt (document.paypalform.quantity.value)


if((document.paypalform.specialoffer.value == "yes") && (quantity == 2))
{
var discount=(20 * (floor(document.paypalform.quantity.value) / 2))
window.alert(discount)
}
else
{
window.alert("no it is not in offer")
}
}
</script>

i GET A SCRIPT ERROR SAYING "FLOOR NOT DEFINED...IM USING THE RIGHT FUNCTION NAME RIGHT?"

vicpal25
06-02-2005, 01:43 PM
woops nevermind..i found it..it is math.floor() not floor()..dangg..

Ultimater
06-02-2005, 01:47 PM
no it's Math.floor

vicpal25
06-02-2005, 01:52 PM
yeah im mean Math...thanks..