[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Keyup

Posted on 2013-06-20
2
Medium Priority
?
315 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 800 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
This article discusses how to implement server side field validation and display customized error messages to the client.
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)
Suggested Courses
Course of the Month19 days, 2 hours left to enroll

834 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