Solved

Keyup

Posted on 2013-06-20
2
306 Views
Last Modified: 2013-06-20
Hi,

I am trying to disable button1 on keyup function but not working. What is wrong with the script?

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script>
            $(document).ready(function () {
            $(".TextBox1").keyup(function () {
                $("#Button1").attr('disabled', 'disabled');
            });
        });

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <asp:Button ID="Button1" runat="server" Text="Button" />
    </form>
</body>
</html>

Open in new window


Thanks

ayha
0
Comment
Question by:ayha1999
2 Comments
 
LVL 15

Accepted Solution

by:
Jagadishwor Dulal earned 200 total points
ID: 39262988
You are using $(".TextBox1") means that is class use $("#TextBox1") to select Id.
0
 
LVL 7

Author Closing Comment

by:ayha1999
ID: 39263004
Thanks
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to dynamically set the form action using jQuery.
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)

920 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

14 Experts available now in Live!

Get 1:1 Help Now