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 create a new window

1930


how to create a Draggable element

2119


how to create an anonymous function

1882


code to set the main window's size

1915


How to block double clicks

1821


how to pass data between pages using Frames

2359


how to create Expandable and Collapsible Menus

2856


how to Scroll a DIV content

2337


snippet to prevent submission of form when certain/any validations got failed

1718


code to positioning of window in certain dimensions

1859


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

1907


how to copy form data between different pages

1942


maximizing the main window

1821


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

1999


code to Hide and Show form controls

1987