Solved

Keyup for dropdownlist

Posted on 2013-06-22
2
264 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Form submit issue 11 52
Summernote and form validation 10 40
Editing XSL files, 2 21
Calling stored proc in EDMX 11 18
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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…

708 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

15 Experts available now in Live!

Get 1:1 Help Now