The correct syntax is : if (isNaN(emp)) .... But emp must be a number if emp is probably a text/string; Try using if (isNaN(parseInt(emp, 10))) ....
I assume u are working in base 10. Eze, Emmanuel U. Systems Development SystemSpecs Limited 5th-8th Floors, 136 Lewis Street, Lagos Phone: +234-1-2633786 Ext 5806 Fax: +234-1-2632622 Mobile: +234-(0)803-3282007 Website: http://www.systemspecs.com.ng -----Original Message----- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Vaishali S. Pandya Sent: Tuesday, July 09, 2002 11:46 AM To: [EMAIL PROTECTED] Subject: Re: isNaN not working emp=document.femp.emp_no.value; if (isNan(emp)){ alert("Invalid Employee Number"); } is not working says object expected if (isNan(mynumber)) alert("Please enter number."); else return false; Regards, Vikramjit Singh, Systems Engineer, GTL Ltd. Ph. 7612929-1031 -----Original Message----- From: Vaishali S. Pandya [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 09, 2002 2:36 AM To: [EMAIL PROTECTED] Subject: isNaN not working hello friends i use mynumber.isNaN() i want that mynumber should be digital only is there any mistake i have done? Thanks Vaishali =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
