how to enable textfild in html at runtime using javascript?

Discussion in 'Javascript' started by Pasha, Mar 28, 2006.

  1. Pasha

    Pasha Guest

    Hi friends,

    I have disabled the textfild by using "disabled" attribute
    & now i want to enable it on some button click. Can any budy please
    tell me how should I do this using java script.

    thank you,

    Prashant.
    Pasha, Mar 28, 2006
    #1
    1. Advertising

  2. Pasha

    RobG Guest

    Pasha said on 28/03/2006 3:00 PM AEST:
    > Hi friends,
    >
    > I have disabled the textfild by using "disabled" attribute
    > & now i want to enable it on some button click. Can any budy please
    > tell me how should I do this using java script.


    Set its disabled property to false:

    textFieldRef.disabled = false;


    e.g.

    <form action="">
    <input name="textOne" disabled>
    <input type="button" value="Enable textOne"
    onclick="this.form.textOne.disabled = false;">
    </form>


    --
    Rob
    RobG, Mar 28, 2006
    #2
    1. Advertising

  3. Pasha

    Pasha Guest

    Hi Boss,

    Thank you very much for the solution.

    Have a nice time................

    Prashant
    Pasha, Mar 28, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Elliot Rodriguez
    Replies:
    2
    Views:
    4,067
    S. Justin Gengo
    Jul 16, 2003
  2. Stu Carter
    Replies:
    6
    Views:
    8,318
    Punisher
    Aug 14, 2003
  3. talal
    Replies:
    0
    Views:
    7,700
    talal
    Oct 4, 2005
  4. Patrick
    Replies:
    1
    Views:
    647
  5. cotton_gear
    Replies:
    2
    Views:
    115
Loading...

Share This Page