SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    eigo hanasemasu ka? Yes. =) ZuulJin's Avatar
    Join Date
    Dec 2001
    Location
    Japan
    Posts
    655
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Disabling form elements

    What do I need to use to disable input form elements on click?

    I have a checkbox in a form. When the user checks that box, I want the javascript to set a couple input elements to disabled (greyed out in IE). I have the O'Reilly Javascript Definitive guide (rhino book), but I don't see anything in there about disable for input elements.

    Thanks for the help.

    [Z]
    U.S. DoD Member in Japan?
    Choose your base. Buy|Sell. Easy
    @ APO Ads.



  2. #2
    SitePoint Zealot Arkkimaagi's Avatar
    Join Date
    Mar 2002
    Location
    Lappeenranta, Finland
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm not sure if object.disabled is fully supported by all
    the browsers.

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  4. #4
    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)
    From reading DWMX's reference and this thread, it would appear that the "disabled" attribute only became official W3C spec with HTML 4.0, and so (presumably) it was a browser-specific thing previously (IE only probably).
    Last edited by M@rco; Jul 13, 2002 at 06:40.
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  5. #5
    SitePoint Zealot
    Join Date
    Sep 1999
    Location
    North America
    Posts
    148
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Flawless_koder
    i'm not sure if object.disabled is fully supported by all
    the browsers.

    Flawless
    From my experience the technique works in IE4+ and NS6+ (not Opera).


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
  •