|
| |||||||||
| Tags: java, jsp, programming, text field |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| 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. |
|
#2
| ||||
| ||||
| 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"> |
|
#3
| ||||
| ||||
| 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> |
|
#4
| ||||
| ||||
| 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 "> |
|
#5
| ||||
| ||||
| 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/> |
|
#6
| |||
| |||
| 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> |
![]() |
|
| Thread Tools | Search this Thread |
| |
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 |