how to enable and disable a input type in jsp

how to enable and disable a input type in jsp

View Answers

December 23, 2009 at 12:28 PM

Hi Friend,

Try the following code:

<script language="javascript">


function function1(){
var n=document.form.name.value;
if (n.length>=5){
document.form.name.disabled=true;
}
else{
document.form.name.disabled=false;
}
}
</script>
<form name="form">
Enter Name:<input type="text" name="name" onkeypress="function1();">
</form>

Thanks









Related Tutorials/Questions & Answers:
how to enable and disable a input type in jsp - JSP-Servlet
how to enable and disable a input type in jsp  how to disable the input type and enable based on some input in the input type   Hi Friend, Try the following code: function function1(){ var n
how to make enable/disable textbox in while(rs.next)
how to make enable/disable textbox in while(rs.next)  Hi, I'm trying to enable/disable the textbox in the while loop. It works but when i want.../disable function,the data are updated correctly. Is my javascript wrong? How do i
Advertisements
how to make enable/disable textbox in while(rs.next)
how to make enable/disable textbox in while(rs.next)  Hi, I'm trying to enable/disable the textbox in the while loop. It works but when i want.../disable function,the data are updated correctly. Is my javascript wrong? How do i
enable disable checkbox in javascript
enable disable checkbox in javascript  How to enable disable checkbox in javascript
enable disable table
enable disable table  hi I have table with 3 columns if i click one column the other 2 column should disable pls can anyboby help me
disable and enable the submit buttons
disable and enable the submit buttons  i have two summit button in my form. one is disabled and other is navigating to the other page. after 3 submissions of the submit button the disabled one must be enabled and the enabled one
Jsp code to enable and disable certain links using jsp code - Java Beginners
Jsp code to enable and disable certain links using jsp code  Hi Everyone, I have a doubt in JSP,I have created a web application which has... have to enable/disable a link.I need a code to do that. Thanks in advance
Enable and Disable Tab in Java
Enable and Disable Tab in Java       In this section you will learn how to enable... name and index number. To enable or disable any tab you can use the setEnabledAt
how to disable submit button after login in jsp
how to disable submit button after login in jsp  Hi, I have... on the back button in browser it stars displaying login page. How to prevent this? how to disable submit button after login in jsp? Thanks   Hi, You can
Task manager enable and disable thru java
Task manager enable and disable thru java  I would like to know, how to enable and disable task manager using java. Kindly, please Let me know
How to read the contents in a file which is of input type file
How to read the contents in a file which is of input type file  I have a jsp page wherein i have to passs the file as input and read the contentsn...-data" ACTION="upload"> File to upload: <INPUT TYPE=FILE NAME="upfile"><
How to disable browser back and forward button after logout [in struts2 or jsp]
How to disable browser back and forward button after logout [in struts2 or jsp]  How to disable browser back and forward button after logout [in struts2 or jsp] I am using window.history.forward(); function
disable the form - JSP-Servlet
disable the form  Hi All, I'm developing a small application. I wrote jsp page in that 8 forms are there.all forms are same but the input values are different.when I click the form button,one function is calling and the input
How to disable browser back after logout - JSP-Servlet
How to disable browser back after logout  Dear All I created JSP.... Anyone having idea how to disable browser back button after logout, please..."); session.removeAttribute("type"); session.invalidate
How to get the full path location using <input type=file>
How to get the full path location using input type=file  Hi. I have used input type=file> in HTML to select an image. But it selects only the image but not with its full path location. how to do it? Thanks in advance
how to disable back button of a browser after logging in? - JSP-Servlet
how to disable back button of a browser after logging in?  how to disable back button of a browser after logging in?  where is the source code
how to disable submit button in jsp using servlet when some condition is satisfied
how to disable submit button in jsp using servlet when some condition is satisfied  how to disable submit button in jsp using servlet when some condition is satisfied
different type input in java
different type input in java  hiiiii... get input different different type like as DataInputStream,Scanner i want to get source code of these all type of input method. thank   Java Read through DataInputStream: import
Disable of Combo - JSP-Servlet
Disable of Combo  Hi! Thanks for your fast reply. In my project i.... That means every user can give grade only at once... so i would like to disable... details with source code and specify the technology you have used like Jsp/Servlet
How to disable browser back after logout - JSP-Servlet
How to disable browser back after logout  thanks deepak, i tried but if i am clicking back still i can see my old pages. i copied your code in my logout page. please if you have any other solution, please give me
Input type select
Input type select  This block of code shows 4 countries even when the size of the SELECT element specified is 2. Why is it so? Select a Country: <select name="country" size="2"> <option name="Australia" value
how to save an input to jsp page in a text file?ave an input given b
how to save an input to jsp page in a text file?ave an input given b  how to save the input given by the user in jsp page to a text file
How to disable an HTML object?
How to disable an HTML object?  How to disable an HTML object
how to take input table name in jsp to create table in mysql?
how to take input table name in jsp to create table in mysql?  how to take input table name in jsp to create table in mysql?   Hello Friend...; <form method="post"> Enter Table Name:<input type="text" name="table
how to pass input from radio button to jsp page
how to pass input from radio button to jsp page  hi.. the code below...:8080/examples/jsp/radiobuttonvalue.jsp"> Are you a student? <input type..."><label> <input name="radiobutton" type="radio" value
how to pass input from radio button to jsp page
how to pass input from radio button to jsp page  hi.. the code below..."><label> <input name="radiobutton" type="radio" value...;<input type="hidden" name="hidden"><font color="white" size="5"><
how to pass input from radio button to jsp page
how to pass input from radio button to jsp page  hi.. the code below..."><label> <input name="radiobutton" type="radio" value...;<input type="hidden" name="hidden"><font color="white" size="5"><
input type dialog box take text and search a list and focus that text - JSP-Servlet
input type dialog box take text and search a list and focus that text  i have a button..when i press it will prompt a dialog box with a text box... then it will search a list which contains data in the same page and if found
store input and display previous input as well current input. in jsp
store input and display previous input as well current input. in jsp  Hi Friend, In this JSP program i want display the previous input as well current inputs also. currently only current input i am able to display whenever i
html input passing to jsp method
html input passing to jsp method  i want code in which jsp method...;input type="text" name=pid onblur="m1()" /> <input type="text" name=pname /> <input type="text" name=pcost /> <input
how to disable browser back button
how to disable browser back button  Am doing a web application in that how to disable browser back button using java script
Type of JSP Directive Tag
Type of JSP Directive Tag  How many types of directive tag in the JSP?   Hi, The answer is given below:ADS_TO_REPLACE_1 There are three types of directive tag. 1. page 2. Include 3. Tag Lib Thanks
How to disable task manager using java
How to disable task manager using java  How to disable task manager using java
How to Disable Catch-all Emails on CPanel
How to Disable Catch-all Emails on CPanel  Hi, How to disable catch all emails setting on CPanel? Thanks
HTML5 input attribute, Define the type, alt and image  of input tag.
HTML5 input attribute, Define the type, alt and image  of input tag. Introduction:Here we will introduce you to about the type attribute of input tag... only given type of data. It is most important for input tag. The alt 
Need Help-How to store input parameter in DB through Java Bean - JSP-Servlet
Need Help-How to store input parameter in DB through Java Bean  Hello Sir, I have a simple Issue but It is not resolve by me i.e input parameter... both are text type. Please review these code: login.html: A simple JSP
how to Use jsp:setProperty to set one bean in other bean while to be set bean is of type java.util.List<beantype>
how to Use jsp:setProperty to set one bean in other bean while to be set bean... (a.jsp) containing input fields for all the 3 classes, and action of that jsp...(in Book.java), as its type is List not Chapter. <jsp:setProperty name="book
how to enable nszombie in xcode 4
how to enable nszombie in xcode 4  how to enable nszombie in xcode 4
how to write the coding for converting the database data for example population into any type of graph using jsp and servlets?//
jsp and servlets pls help me out how to write the coding for converting the database data for example population into any type of graph using jsp and servlet...coding for converting the database data  how to write the coding
How to create an input box?
How to create an input box?  How to create an input box
How to enable proxy settings in Maven?
Maven 3 Tutorial: How to enable proxy settings in Maven? In this tutorial I will teach you how to enable proxy settings in maven? If your computer is behind... build tools is not able to access the remote repository. To enable the proxy
disable backward and forward buttons of the browsers - JSP-Interview Questions
disable backward and forward buttons of the browsers  Dear, Thanks for your last reply. I want if you help me to disable the backward of forward of the browser by program using javascript or java. Sometimes when i access
How to enable second level cache in Hibernate 5?
How to enable second level cache in Hibernate 5?  Hi, I want to enable the secondary level caching in Hibernate 5. How to enable second level cache in Hibernate 5? Thanks
How to enable second level cache in Hibernate 5?
How to enable second level cache in Hibernate 5?  Hi, I want to enable the secondary level caching in Hibernate 5. How to enable second level cache... is not dirty. So, in Hibernate 5 you can enable secondary level caching
disable backward and forward buttons of the browsers - JSP-Interview Questions
disable backward and forward buttons of the browsers  Dear, Please can you help me : I want to disable backward and forward buttons... with no toolbar and other properties disabled and disable the right click
How to read user input in C++
How to read user input in C++  How can i get an input from the users in C++?   You can use the standard input "cin" to get the input from user.. For example: int age; cin >> age
input type checkbox HTML5,  input type radio HTML5.
input type checkbox HTML5,  input type radio HTML5. Introduction:In this tutorial, you will the use of  checkbox and radio type input field...;h2>Implementation of&nbsp; password type input tag. </h2> <
JSP Mime Type
JSP Mime Type          JSP Mime Type for Multipurpose Internet Mail.... Understand with ExampleADS_TO_REPLACE_1 In this section, you will learn how to get
How to Type in japanese in java Textfield?
How to Type in japanese in java Textfield?  Hello Sir/madam; Am creating an application in java in which i want to get a japanese String input from user.User needs to type in japanese in the textField.but I dont know how to type
How to disable cut, copy, paste, rename, etc from the Windows Registry ?
How to disable cut, copy, paste, rename, etc from the Windows Registry ?  Hello. I'm trying to create a software in VB.Net to disable the following... disable them from the Windows registry. My problem is I don't know which

Ads