tags:

views:

34

answers:

1

I have the following code and it gives me the text but not the value. What is wrong and how do I fix it?

 function pageLoad() {
       $('#<%=dpEmploymentStatus.ClientID%>').change(function() {

       alert($('#<%=dpEmploymentStatus.ClientID%>' + ' option:selected').text());


       }).change();
   }
+1  A: 

Use val() instead of text().

Yves M.