Solved

calling jquery from aspx dropdownlist list

Posted on 2014-09-15
1
78 Views
Last Modified: 2015-01-27
I want to call a jquery function from aspx dropdown list. When ever the selected value is change it should displayan alert.
How can I do this please help.
0
Comment
Question by:Angela4eva
1 Comment
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 40324416
jQuery(function($) {
//    $("#<%= DropdownList1.ClientID  %>").on("change", "select", function() {
    $("#<%= DropdownList1.ClientID  %>").on("change", function() {
          var value = $(this).val();
          var text = $("option:selected", this).text();
          alert("you choose : " + value + "\ntext is : "+text);  
    });
})

Open in new window

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to dynamically set the form action using jQuery.
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…

760 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

20 Experts available now in Live!

Get 1:1 Help Now