Share on Google+Share on Google+

Ragavendran.R
Validating Emp ID Reply
2 Answer(s)      8 years ago
Posted in : JSP-Servlet

Ads

View Answers

August 11, 2008 at 3:57 PM


hai frnd....
The change i made is for accepting numerals only.....
If u type any characters...it will show u an alert window telling "Please input valid emp no"
this msg u can type wat ever u want...
but dont make any change in the variable anum

thanks and regards
prashu


August 11, 2008 at 4:23 PM


hai frnd....
here i have mistyped as phone....
var anum=/(^\d+$)|(^\d+\.\d+$)/
if (anum.test(phone))
return true
else{
alert("Please input valid emp no!")
return false
}



please use ur field name...

var anum=/(^\d+$)|(^\d+\.\d+$)/
if (anum.test(id))
return true
else{
alert("Please input valid emp no!")
return false
}



thanks and regards,
Prashu
prashobvee@gmail.com









Related Tutorials/Questions & Answers:
Validating Emp ID Reply - JSP-Servlet
Validating Emp ID Reply  Respected Sir/Madam, I am Ragavendran.R.. Thanks for your quick response.. Actually I need to check whether Emp ID... valid emp no!") return false } if(form.id.value=="") { alert
validating email id
validating email id  how to validate the email id ?   <...=""; return false; } } </script> <form id="form...;tr><td>Email </td><td><input type="text" id="email" ><
Advertisements
get details of employee after enter the emp_id
get details of employee after enter the emp_id  how to get employee details after entered the emp_id from database after that we have three more option add new,modify and delet employee   Please visit the following
get details of employee after enter the emp_id
get details of employee after enter the emp_id  how to get employee details after entered the emp_id from database after that we have three more option add new,modify and delet employee   Please visit the following
Finding MAX value from emp_id column using SQL query?
Finding MAX value from emp_id column using SQL query?  I need to select maximum of the Emp_id values from SQL server 2005 table.I was using... of emp id from the table.(Actually it picks up Max value using by looking at 1st
validating a HTML
validating a HTML  What are the reasons for validating a HTML
id
id  how to find date of birth and gender in id in html with the help of javascript
Validating XML
Validating XML  Hi, I have a string containing data in XML format. I have to Validate this xml data. Is there any method in java that allows strings as input to validate xml?   Please visit the following link: http
validating web pages
validating web pages  How to validate HTML web pages
Validating image size
Validating image size  How to validate image size to 2MB in javascript which is updating to mysql database
Reply - JSP-Servlet
to solve that emp id validation by checking only for empty field in my home page and for Invalid emp id, i passed the control to process.jsp and caught numberformat exception to display "Please enter Valid ID" in the form of an alert box
validating a form before data is entered.
validating a form before data is entered.  How can I avoid validating a form before data is entered
Validating Number Very Urgent - JSP-Servlet
of Emp ID text box.. I am sending the code for your kind reference which tends you...; wat do u want to check? if u want to insert number only in the emp id...Validating Number Very Urgent  Respected Sir/Madam, I am
validating - Swing AWT
validating   hi another problem i am facing in swing is that is i have got many textfeilds ex: Roll No: Name: Address: so Roll No TextField have to Contains only Numbers. Name TextFields have to contain only
Validating the password field
Validating the password field  When the validate method returns back to the registration page the password field get cleared there by asking again one more time to enter the password field at the time of re-submitting the form
reply to the mail
reply to the mail  Hi! which jar file needed to be added? Thanks   Question not clear
reply must
reply must  is it critical to do a software job based on games(java) i know core java & advanced java basics only please give me answer
validating username and password from database
validating username and password from database  Hello sir, i am developing a login page. i want that when i fill data in text fields. it validate data from database. if enter data is match from database. page goes to next page
Validating date in javascirpt - Development process
Validating date in javascirpt   Hi Friends, Can u plz give sample code for validating date in javascript using textbox.((dd--mm--yyyy format) Thank u in advance  Hi, The following code may be useful
Reply - JSP-Servlet
;=imgs.length;i++) { var imgid="myImage"+i; var emp_id = "eid"+i..._value = document.getElementById(emp_id).value...="getuser.jsp" url=url+"?emp_id="+emp_value; xmlHttp.onreadystatechange
Reply Me - Java Beginners
Reply Me  Hi All, I want to using query string in my page......when i click any link then open all form clearly but i want to pass id=1 in url...=13c222b87273340cf002bfba4ab9d045. please reply me fast its urgent
validating text fields - Swing AWT
validating text fields  hi i am using NETBEANS IDE so when i want to validate TEXTFEILDS if one textfield is blank then it should focus on that particular textfield so help me with this plz..... /* * To change this template
id creation
id creation  CREATE TABLE mohan2 ( sno bigint(20) NOT NULL AUTO...) { Scanner s=new Scanner(System.in); System.out.println("Enter emp name:"); String str=s.next(); System.out.println("Enter emp sal
Image Selection Reply Urgent.. - JSP-Servlet
Image Selection Reply Urgent..  Respected Sir/Madam, I am R.Ragavendran.. Thanks for yuor fast response.. Sir actually I will be much more... emp_value=""; for(var i=0;i0) { for(var i=0;i
Validating date in javascript - Java Interview Questions
Validating date in javascript   Hi Deepak, Can u give sample code validating date in javascript using text box. thank u in advance  In what format you are going to enter the date in Text box (i.e : dd/mm
Reply me - Java Beginners
Reply me  Hi, There are one form product_master these fields are prod_id,prod_name,prod_opstock,prod_excise,prod_vat,reorder_level,reorder_qty,vendor_name All fields are input manualy but i want this vendor_name take
reply me - Java Beginners
reply me  Hi, user enter vend_id in text box ten open the addform.jsp In the addform.jsp have two button Update and delete addform.jsp is display with fetching data in all text box I m sending code before 5
generate ID
generate ID   Statement st1=con.createStatement(); String sql="insert into employee values(emp_seq.nextval,'"+ename+"','"+eadd+"','"+ephone+"','"+email+"','"+department+"',"+Integer.parseInt(ebpay)+",20,0)"; st1.executeUpdate
Reply Me - Java Beginners
Reply Me  Hi Amardeep I am sending database table name,code and db file please insert this data in this table its very urgent.... My.... can you send all file in make zip file on my id. Because your code very large
total id
total id  how to print and total my id number ..for example if my id is 0123456789 the output will look like this : 0123456789 0+1+2+3+4+5+6+7+8+9=45 help me plz
Tutorials   
Java Spring Hibernate Struts Training fat image from db fat image from db fat image from db fat image from db unable to get value returned from javascript variable in page How to change image size before adding to mysql using jsp Design a registration.jsp page with input for user registration details Cart Quantity jsp servlet coding issue servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? image pdf marking pdf marking Multiple image upload using JSP Read code from excel sheet and upload into database using JSP Student java about search engine Convert BLOB to PDF and save it to a location how to copy files from remote to local machine using SFTP SSL in java? Like Team viewer Socket and Servert -Jsp how to copy files from remote location to local using java? How To Store Multilple Images In MySQL database dynamically with image uploader and then retrieve them in image gallery using java how to create SOAP based web service in java? how to fetch data from mysql database table and draw a bar chart on that data using in jsp how to create users in LDAP using java? how to authenticate user using TIVOLI api in java? how to create users using IBM Tivoi API in jsp/servelet? Java/J2ee Please explain this code as many packages and classes are unknown to me .! how to download the uploaded folder files using jsp Login Query image is display from path of mysql database please reply the code to store dynamic fields in database? Reloading issue in jsp How to get Button Id ? calling one jap page from another jsp page login login Problem to get connection from DAO class to JDBC Page Loading Time Fix table's column's name row(1st row of the table) so that it does not move up when the table is scrolled up to view more rows below Sending hidden values

Ads

 
Advertisement null

Ads