Sekhar Chand

Ranch Hand

Posts: 73

posted 10 years ago

hai guys,

i am new to javascript so thats why i strucks at every point.

here my task is not allow user to enter more than 10000.00

If he enter not a digits he must be alerted.

we can accept any numbers after decimal, but when we submitting form or going to next field that value must be rounded to 2 didgits after the decimal.

if he enters 10000.001 , he must e alerted.

if he enters 12.0456, it must be rounded to 12.05.

if he enters 12qwqw he must be alerted.

if he enters 10000 or 10000.00 its ok

if he enters 2. it must be 2.00

the number of digits after decimal must be two .

if he enters 0 it must be rounded to 0.00

if he enters nothing no problem.

how to do this

I have done this but i am getting alerts in the validations of the next field.

So please tell me how to complete this task

nani

i am new to javascript so thats why i strucks at every point.

here my task is not allow user to enter more than 10000.00

If he enter not a digits he must be alerted.

we can accept any numbers after decimal, but when we submitting form or going to next field that value must be rounded to 2 didgits after the decimal.

if he enters 10000.001 , he must e alerted.

if he enters 12.0456, it must be rounded to 12.05.

if he enters 12qwqw he must be alerted.

if he enters 10000 or 10000.00 its ok

if he enters 2. it must be 2.00

the number of digits after decimal must be two .

if he enters 0 it must be rounded to 0.00

if he enters nothing no problem.

how to do this

I have done this but i am getting alerts in the validations of the next field.

So please tell me how to complete this task

nani

Eric Pascarello

author

Rancher

Rancher

Posts: 15385

6