Solved

Keyup for dropdownlist

Posted on 2013-06-22
2
265 Views
Last Modified: 2013-06-30
Hi,

I am trying the following script to disable a button when changing item in a dropdownist in an aspx page but not working. The script is working for text box.

    </script>
        <script type="text/javascript">
            $(document).ready(function () {
                $(".ddlDrop").keyup(function () {
                    $("#Button1").attr('disabled', 'disabled');
                });
            });

    </script>

 <asp:DropDownList ID="ddlMat" runat="server" CssClass="ddlDrop">

Please help.

Thanks

ayha
0
Comment
Question by:ayha1999
2 Comments
 
LVL 10

Accepted Solution

by:
Monica P earned 250 total points
ID: 39267818
Can u try as like below

 <asp:DropDownList ID="ddlMat" runat="server" CssClass="ddlDrop" onchange="Populatedetail();">

 <script type="text/javascript">
  function Populatedetail() {
        var Button1 = document.getElementById('Button1');
       //Disable the Button
 </script>
}

Open in new window

0
 
LVL 7

Author Comment

by:ayha1999
ID: 39267822
still not working

    <script type="text/javascript">
        function Populatedetail() {
            var Button1 = document.getElementById('Button1 ');
            //Disable the Button
        }

    </script>
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now