Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

calling jquery from aspx dropdownlist list

Posted on 2014-09-15
1
Medium Priority
?
99 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 83

Accepted Solution

by:
leakim971 earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses how to implement server side field validation and display customized error messages to the client.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
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…
Suggested Courses

927 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