Home Answers Viewqa JSP-Servlet how to enable and disable a input type in jsp

 
 


praveena
how to enable and disable a input type in jsp
1 Answer(s)      3 years and 5 months ago
Posted in : JSP-Servlet

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 Pages:
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
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 and Disable Tab in Java
Enable and Disable Tab in Java       In this section you will learn how to enable... number. To enable or disable any tab you can use the setEnabledAt(int index
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
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
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 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
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 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
Enable Browser's back button
Enable Browser's back button  how to redirect to a home page when browser's back button is pressed in jsp instead of displaying the previous page
Inform user to enable JavaScript
Inform user to enable JavaScript   Hi sir How can we inform user to turn on JavaScript ? Because if we have implemented validation etc... Document </TITLE> <body> <script type="text/javascript">
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
enable hyperlink
enable hyperlink  How to enable hyperlink
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
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 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...="post"> Enter Table Name:<input type="text" name="table"><input type
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 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="radio" name...; <input name="radiobutton" type="radio" value="radiobutton" />
how to pass input from radio button to jsp page
how to pass input from radio button to jsp page  hi.. the code below...; <input name="radiobutton" type="radio" value="radiobutton" /> </label></td> <td width="350"><input type
how to pass input from radio button to jsp page
how to pass input from radio button to jsp page  hi.. the code below...; <input name="radiobutton" type="radio" value="radiobutton" /> </label></td> <td width="350"><input type
How to disable an HTML object?
How to disable an HTML object?  How to disable an HTML object
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
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 output
input to read the user input.. In this section, you will see how the standard I... Input And Output       Introduction The Java I/O means Java Input/Output and is a part
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
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
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 enable nszombie in xcode 4
how to enable nszombie in xcode 4  how to enable nszombie in xcode 4
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: There are three types of directive tag. 1. page 2. Include 3. Tag Lib Thanks
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
Disable UITableView Scrolling
Disable UITableView Scrolling   How to disable the UITableView Scrolling either programmatically or in XIB
enable text box
enable text box  Dear all I would like to enable a textbox by clicking on a button. pleas ehelp me out how can i do this regards JV
disable keyboard in java applet
disable keyboard in java applet  How to disable key board of my client in an java applet embedded in a website while the applet is running.? Plz help
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
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
uitextfield disable keyboard
uitextfield disable keyboard  How to disable keyboard of UITextView in iPhone SDK application?   There are two ways to disable the keyboard...)]; [self.view addSubview:pv]; return NO; } //or simply disable
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
Keyboard Input
box to type into is the how standard programs communicate. Console..., ...). Many authors have struggled with how do simple input... Java NotesKeyboard Input There are two approaches to getting keyboard
jsp and ajax
jsp and ajax  how to enable or disable textbox using radio buttons by using jsp and ajax
Browser Back Button Disable/Hide/Invisible using Java Script
Browser Back Button Disable/Hide/Invisible using Java Script  Dear Sir, Please Help..., Q: How to Write Code For Browser Back Button Disable... know reply me...   <SCRIPT type="text/javascript">
How to disable task manager using java
How to disable task manager using java  How to disable task manager using java
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
JTree Multiple Selection
Enable and Disable Multiple Selections in a JTree Component       In this section, you will learn how to enable and disable the multiple selections in a JTree
How to disable Browser's back button (at the same time i want my own back button to be enabled) :p
How to disable Browser's back button (at the same time i want my own back button to be enabled) :p  Hi, I have designed a "back" button for jsp page. Now I want to disable Browser's default button So that people will use "back
How to disable Browser's back button (at the same time i want my own back button to be enabled) :p
How to disable Browser's back button (at the same time i want my own back button to be enabled) :p  Hi, I have designed a "back" button for jsp page. Now I want to disable Browser's default button So that people will use "back
javascript focus input
element. To understand how focus can be set to any input field, we have created...(); } } </script> </head> <body> Name<input type="text" id="name"/><br> Address<input type="text" id="add"/><br> <

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.