SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot Nate's Avatar
    Join Date
    Sep 2001
    Location
    BC, Canada
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Disabling/Enabling a text field if...

    In forms, we have all seen where people have numerous options to choose from in a SELECT field, or they can select Other, and type something in a different text field.

    I would like to be able to disable this Other text field if the SELECT isn't on Other.

    I know how to disable the submit button, but I don't know how, or even if, you can disable/enable a specific text field.

    Any help would be appreciated.
    NATHAN WRIGHT
    PHP Developer, Simple Station

  2. #2
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Easy peasy lemon squeezy!

    Code:
    <INPUT TYPE="text" NAME="textfield" ID="test1">
    <INPUT TYPE="radio" NAME="radiobutton" VALUE="radiobutton" onClick="test1.disabled=true;">

    M@rco

  3. #3
    SitePoint Zealot Nate's Avatar
    Join Date
    Sep 2001
    Location
    BC, Canada
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks!
    NATHAN WRIGHT
    PHP Developer, Simple Station


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
  •