jsp validation

jsp validation

enter name-___ enter number-__

I want that the focus should not go to number till the time u have entered name. Means the number text should be disabled.. i require code for it....

View Answers

April 11, 2011 at 1:17 PM

<html>
<script>
function validate(){
var nn=document.form.name.value;
var num=document.form.number.value;
if(nn==""){
  alert("Enter Name");
  document.form.name.focus();
  return false;
}
else{
  document.form.number.focus();
  document.form.number.disabled=false;
if(num==""){
   alert("Enter Number");
   return false;
}
}
return true;
}
</script>
<form name="form" onsubmit="javascript:return validate();">
<table>
<tr><td>Enter Name:</td><td><input type="text" name="name"></td></tr>
<tr><td>Enter Number:</td><td><input type="text" disabled name="number"></td></tr>
<tr><td></td><td><input type="submit" value="Submit"></td></tr>
</table>
</form>
</html>









Related Tutorials/Questions & Answers:
jsp validation
jsp validation  enter name-___ enter number-__ I want that the focus should not go to number till the time u have entered name. Means the number text should be disabled.. i require code
validation - JSP-Servlet
.jsp. Required fields are-: 1.login 2.password 3.Firstname 4.lastname...,jsp,beans demo of all these to facilitate how to write code... iam very... side validation and when you submit the form it passes the data to some file over
Advertisements
validation - JSP-Servlet
, Please visit the following link to have an example of user validation in JSP page with the MySQL database. http://www.roseindia.net/mysql
jsp-oracle validation - JDBC
jsp-oracle validation  Dear friends, my validation not takes place..., Implement validation code. Insert into database function...://www.roseindia.net/jsp/ Thanks. Amardeep   Hello I am try so many times
JSP-jdbc validation - JSP-Servlet
JSP-jdbc validation  How to validate login email id using JSP, where..., login application in jsp function validateForm(theForm... for more information. http://www.roseindia.net/jsp/valid-email
Validation.... - JSP-Servlet
Validation....  in registration page. if i entered an Logine name , which all ready in the data base. how i can get the appropiate msg like "User all ready in the data base" in my data base User ID is the primary key and Login
jsp+ajax validation
jsp+ajax validation  hi, I have created the jsp form (course... have created student jsp form where it should display register number... 60% in the drop down list .how to validate student from using ajax and jsp
Radio button validation using jsp - JSP-Servlet
Radio button validation using jsp  I had one jsp Page and servlet. I did my validations in servlet for my jsp page which contains the radio... a value for radio Buttons) then it will return to same jsp page with the given
JSP data base validation
JSP data base validation  please explain how to validate form input string with database n also how its notify that entered data exists already .please reply soon   hi friend, <%@ page language="java" contentType
java validation problem - JSP-Servlet
java validation problem  I have created a Registration page.I want validate the username entered by the user at the time he enters the username.How... problem. Here is the link http://www.roseindia.net/jsp/user-registration-form
login form validation - JSP-Servlet
login form validation  hi, how to validate the login form that contains user name and password using post method . the validation should not allow user to login in the address bar thanks regards, anand
validation before entering values into database in jsp
validation before entering values into database in jsp  Hi, my project involves entering data into database from jsp form.but before entering into database it should pop up a alert message that "you have selected product:name
combox validation javascript code - JSP-Servlet
combox validation javascript code  hiiiiiii, I want a javascript code for combobox field validation for my Lotus Notes web page.... thnx  Hi This is the source code of combobox validation in javascript
Date validation in JSP
Date validation in JSP       Example for validating date in a specified format in a JSP page This example illustrates how to use date validation in a JSP page. Here in this code we are using
validation
validation  validation
validation
validation  we are doing payroll system project in java.So pls provide the complete validation code for employee master form
Form validation using jQuery plug in & JSP
Form validation using jQuery plug in & JSP In this tutorial, we will discuss about form validation using jQuery plug in & display of submit content... validation, the submitted content is displayed by the JSP page. The plug
logout validation - JSP-Servlet
validation - JSP-Servlet
Ajax validation - JSP-Servlet
validation.....
validation.....  hi.......... thanks for ur reply for validation code. but i want a very simple code in java swings where user is allowed to enter only numerical values in textbox , if he enters string values then it should
validation
Validation method valid the in put. otherwise call the javascript onsubmit to check... code.Ok if you use struts then you can use Validation method valid the in put
Validation
); JLabel label=new JLabel("JTable validation Example",JLabel.CENTER); JPanel panel=new JPanel(); panel.add(scroll); JFrame frame=new JFrame("JTable validation
validation
form using spring ,hibernate and jsp my all classes and jsp pages are pasted..." prefix="form"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix
validation
validation  please help me to check validation for <form> <table class="form"> <tr> <td class="col1"> <label>Sno:</label> </td> <td
JSP
JSP   How to create CAPTCHA creation by using JSP? I need an code for CAPTCHA creation by using JSP...   You can create a captcha validation using jsp. Have a look at the following tutorial: Captcha Creation
Validation of datepicker
Validation of datepicker  I have a datepicker in my JSp...the seleted dates are put in a text box. I want the alert the user from selecting future... a future date is entered..How to do this validation in javascript or jsp
Email validation is JSP using JavaScript
Email validation is JSP using JavaScript... will show you how to validate email address in you JSP program using JavaScript.... In your JSP program you can use JavaScript to validate the email address
JSP Alert
;     JSP Alert is used to put the validation on login... the validation on the login form using Javascript method in JSP page.  Understand... to create alert box in a JSP page. Before applying validation we create a JSP file
Struts validation
Struts validation  I want to put validation rules on my project.But... validation rules,put the plugins inside strutsconfig.xml, put the html:errors tag in jsp,and also mention all the messages in the applicationresources.properties.
JSP
; 2nd page is for server side validation of registration page Now, I want...; Hi Friend, Please visit the following links: http://www.roseindia.net/jsp/javascriptpagerefresh.shtml http://www.roseindia.net/jsp/user-registration-form
jsp.....
jsp.....  1..login screen->user-id and password will be entered and save has to be validated against database corresponding table.on successful validation,detail like client ip and type of browser has to captured
Validation for customer information
Validation for customer information  hi.... I have created one jsp page which contains customer infomation such as name,city,emailid,mobileno,date of birth.I want to do validation for all these fields using javascript....customer
validation files
validation files  If I place validation files in the folder where the action classes are present,will there any error arise
javascript validation
javascript validation  validation of comparing dropdownlist and textbox in javascript
jsp
jsp  how jsp translated into servlets
JSP
JSP  How to run jsp program in eclipse
jsp
jsp  how to create jsp page
Jsp
Jsp  Can I implement interface in jsp
JSP
what is JSP forward tag for  what is JSP forward tag for   It forwards the current request to another JSP page. Below is the syntax for the same:- <jsp:forward page="...url..." /> We can also forward parameter
jsp
jsp  how to include two jsp page
jsp
jsp  how to create a table in oracle using jsp and the table name is entered in text feild of jsp page
jsp
jsp  write a code for jsp file generator to generate a jsp page automatically taking html page as input
JSP
JSP  Hi, What is JSP? What is the use of JSP? Thanks   Hi, JSP Stands for Java Server Pages. It is Java technology for developing web applications. JSP is very easy to learn and it allows the developers to use Java
jsp
jsp   what is the basic necessities reguired for running jsp using JDBC bridge?? and how to write a jsp code to access the detail present in microsoft access pls send link regarding above
jsp
jsp  how to pass jsp variable to an html page
JSP
JSP  relevant difference between servlet and jsp in 1 line
jsp
jsp  how to include google map in our jsp page
jsp
jsp  how to write a servlet and jsp program for user login form
jsp
jsp  how to write a servlet and jsp program for user login form

Ads