Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links



Disabling a Text Field In JSP

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 11-03-2010
Member
 
Join Date: Nov 2009
Posts: 880
Disabling a Text Field In JSP

Hello, I am working on java programming language and currently I am searching for the solution from which I will able to Disable a Text Field In JSP. I have made different search on the internet for getting the solution on it, but I am not able to know it. If you are having any idea from which I can able to get the solution for it, then please provide that to me. I will be thankful to you.
Reply With Quote
  #2  
Old 11-03-2010
opaper's Avatar
Member
 
Join Date: May 2008
Posts: 2,362
Re: Disabling a Text Field In JSP

So, simple thing to perform in the JSP. You just need to add the line of code in your program and then you will able to get the solution for your problem:
Code:
<INPUT id ="txt1" name = disabled"TestingText" value ="Field">
Just make use of it and you will get the textfield which is disabled.
Reply With Quote
  #3  
Old 11-03-2010
Modifier's Avatar
Member
 
Join Date: Jan 2008
Posts: 1,502
Re: Disabling a Text Field In JSP

Hello, I have got the code below in which Disabling of a Text Field is done in jsp:
Code:
<logic:equal name="Test" property="Info.listBoxPopulated" scope="request" value="true">  
  <html:text name="Test" maxlength="3" size="3" property="Info.textBox" styleId="TxBox" disabled="true" />  
</logic:equal>  
<logic:notEqual name="Test" property="Info.listBoxPopulated" scope="request" value="true">  
  <html:text name="Test" maxlength="3" size="3" property="Info.textBox" styleId="TxBox" disabled="false" />  
</logic:notEqual>
Reply With Quote
  #4  
Old 11-03-2010
MindSpace's Avatar
Member
 
Join Date: Feb 2008
Posts: 1,832
Re: Disabling a Text Field In JSP

Hello, if you make use of the one line code below in your program the you will come to know that you are getting the text field which is disabled. So, just make use of the code below and add it into your jsp page code and you will able to get solution for your problem.

Code:
<INPUT id ="text1" readonly name ="Testing" value ="Field ">
Reply With Quote
  #5  
Old 11-03-2010
Praetor's Avatar
Member
 
Join Date: Apr 2008
Posts: 1,937
Re: Disabling a Text Field In JSP

Hello, it is possible to disable the any of the form element. If you want to disable any of the form element then you need to use the phrase disabled="true" in the element tag. And if you want to enable the disabled tag then you must need to use the code below for enabeling it.

Code:
<script language="javascript">
function revertback()
{
document.frm1.address2.disabled=false;
} 
</script>
<a href="javascript:enableField()">Enable it<a/>
Reply With Quote
  #6  
Old 11-03-2010
Member
 
Join Date: May 2008
Posts: 1,990
Re: Disabling a Text Field In JSP

Hello, disabling of the textbox can be achived with the help of your program below:
Code:
<html>
<head>
<title>Text Box Disabling</title>
     <SCRIPT LANGUAGE="JavaScript">
               function DisTesting() 
                   {
                    if(DisTesting.Dist.disb.checked)
                      {
                       DisTesting.Dist.txt1.blur()     
                       DisTesting.Dist.txt1.disabled=true                  
                      }
                   else
                      {
                       DisTesting.Dist.txt1.disabled=false
                      }
                   }   
       </SCRIPT>
</head>
 <CENTER>
  <FORM NAME="Dist">
        <BR><BR><BR><BR>
         Mark here for disabling: <INPUT TYPE="checkbox" NAME="disb" onClick="DisTesting()"> 
         <INPUT TYPE="text" NAME="txt1" SIZE="30" onFocus="DisTesting()">
  </FORM>
  </CENTER>
</body>
</html>
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Disabling a Text Field In JSP"
Thread Thread Starter Forum Replies Last Post
Add custom text field while saving Excel files as csv Darmody MS Office Support 2 31-12-2011 06:18 PM
count commas in a text field in Access SeaGuy Windows Software 4 07-09-2011 09:12 PM
Populate Text Field Based On Drop-Down List Selection Kaalicharan Software Development 6 21-07-2010 10:59 AM
To access a text field from another form Sanket07 Software Development 6 06-02-2009 06:42 PM
I want to convert field to text in Word 2007? Vibhas Windows Software 3 30-12-2008 01:44 PM


All times are GMT +5.5. The time now is 05:25 AM.