I'm trying to make a drop down list which contain is dynamically changed.
drop down1 contains names of the months, january to december and drop down2 contains relevent days.(1,2,...).
my requirement is if I select january drop down2 should be listed 1,2,..31.and select february drop down2 should be 1,2,...28.
I tried using followng code and It does not give correct out put.It is continously adding days when i select each month.
var fillDays = true;
var selectedItem = $('#month option:selected');
var selectedItemText = selectedItem.val();
var dropDown = document.getElementById('day');
if(selectedItemText=='feb' && fillDays)
fillDays = false;
View Complete Post