Results 1 to 6 of 6

Thread: Disabling a Text Field In JSP

  1. #1
    Join Date
    Nov 2009
    Posts
    877

    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. #2
    Join Date
    May 2008
    Posts
    2,389

    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.

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    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. #4
    Join Date
    Feb 2008
    Posts
    1,852

    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. #5
    Join Date
    Apr 2008
    Posts
    1,948

    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. #6
    Join Date
    May 2008
    Posts
    2,012

    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>

Similar Threads

  1. How to save text field with zero in .csv format from Excel
    By Eeshika18 in forum MS Office Support
    Replies: 2
    Last Post: 10-02-2012, 05:27 PM
  2. count commas in a text field in Access
    By SeaGuy in forum Windows Software
    Replies: 4
    Last Post: 07-09-2011, 08:12 PM
  3. Populate Text Field Based On Drop-Down List Selection
    By Kaalicharan in forum Software Development
    Replies: 6
    Last Post: 21-07-2010, 09:59 AM
  4. To access a text field from another form
    By Sanket07 in forum Software Development
    Replies: 6
    Last Post: 06-02-2009, 06:42 PM
  5. I want to convert field to text in Word 2007?
    By Vibhas in forum Windows Software
    Replies: 3
    Last Post: 30-12-2008, 01:44 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,855,143.57085 seconds with 17 queries