i am making a purchase sheet in html ,it contain names of
product(by selecting checkboxes),quantity(textbox) and
price(checbox), by using java script i am restricting the
user to prevent them to enter the wrong data ,so i made the
servlet were i am only able to prevent them to enter the
page in empty field , so my doubt is how do you prevent them
how to enter non numerical data in quantity field

Answer Posted / shivkumar

use isNumber() function to check whether entered data is non-
numerical ??
if it is then give an error

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

code to Hide and Show form controls

1810


Reading which Non-Character Key was pressed

1693


how to Scroll a DIV content

2161


how to pass data between pages using Cookies

1850


write a code that user can choose/alter Body Text Size

1608






program to bring a window to the front

1570


code to detect versions of different browsers like internet explorer, netscape, mozilla, opera etc

1740


how to Auto Scroll the page

1633


code to set the main window's size

1708


code to keep a page Out of the browser history

1655


How to encode and decode URL strings?

1800


program to show a progress bar

2126


Create a Menu that can be activated while clicking on Right Mouse button

1711


communication between main window and new windows

1705


advance the focus to next consecutive fields when Enter Key is pressed

1796