tags:

views:

97

answers:

2

Hi i am using dropdown for display the timezone.The timezone values are come from database.Whenever the user change the value I need to alert the new timezone.For example if user change the time GMT+5.30 to GMT+6.30 then I want to alert GMT+6.30.Here the the dropdown values coming as an array?What can I do to get the values?

+3  A: 

If you're using select and you have set values for your options, you can:

$("select#dropdown").change(function(){
  alert($(this).val());
});

To do this, you need the jQuery framework. http://www.jquery.com/

thephpdeveloper
A: 

checkout http://www.texotela.co.uk/code/jquery/select/ plugin for handling select element, very handy.

r0ash