field input round number
send you a image you attached to show a example, what i need the field input "cajas field" as a round number, not like now show: 2.13, i need roun the number to 3, and with ecart buy the iten 3 boxes.
send you a image you attached to show a example, what i need the field input "cajas field" as a round number, not like now show: 2.13, i need roun the number to 3, and with ecart buy the iten 3 boxes.
you can use a java script on change event on the text field:
onchange="this.value = Math.ceil(this.value);"
works for me, see the attached screen shots.
maybe you need to clear your browsers cache.
it would have helped a great deal if you had let me initially that you where using javascript to populate the the subtotal field.
in your script, change:
document.calcform.subtotal.value = dp(eval(document.calcform.quantity1.value) / (document.calcform.select1.value))
to:
document.calcform.subtotal.value = ciel(dp(eval(document.calcform.quantity1.value) / (document.calcform.select1.value)))
x1.php
i did you told me and but not in the result field "boxes" nothing appears. If you try to put a number in field "put her your number", automatically it give you the price and de boxes (rounded), but the boxes field is empty.
sorry, i had a syntax error, this line:
document.calcform.subtotal.value = ciel(dp(eval(document.calcform.quantity1.value) / (document.calcform.select1.value)))
should be:
document.calcform.subtotal.value = Math.ceil(dp(eval(document.calcform.quantity1.value) / (document.calcform.select1.value)))
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.