Results 1 to 2 of 2

Thread: Disable Option List Control with JavaScript

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2002
    Location
    Game Over, Man!
    Posts
    36

    Unhappy Disable Option List Control with JavaScript

    Can someone provide some code demonstrating how to disable an ASP.Net option list control from the client-side using javascript? I can disable textbox, dropdown and list controls by using the following javascript:

    document.myForm.myTextBoxCtrl.disabled = true
    document.myForm.myDDownCtrl.disabled = true
    document.myForm.myListCtrl.disabled = true

    But this does not work for the option list control. Please help.

    Thanks

  2. #2

    Thread Starter
    Member
    Join Date
    Jul 2002
    Location
    Game Over, Man!
    Posts
    36

    Problem Solved

    I solved the problem. The correct syntax is as follows:

    document.getElementById("myOptionListCtrl").disabled = "true";

    I hope someone else can benefit by this. Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width