ki Posted March 28, 2007 Share Posted March 28, 2007 okay im not really good with javascript but im attempting to make a birthday thing setup function changeRegisterBirthday(e) { var bday = document.getElementById('registerBirthdayDay'); var bmonth = document.getElementById('registerBirthdayMonth'); var smonth = registerBirthdayMonth.options[registerBirthdayMonth.selectedIndex].value; if(e == "1") { if ((registerBirthdayMonth.options[registerBirthdayMonth.selectedIndex].value == "6") || (smonth == "9") || (smonth == "4") || (smonth == "11")) { for (var i=0; i < 30; i++) { registerBirthdayDay.options[i] = new Option (i, i); } } Thats what I got (the rest of the code is cut off because its doing the same thing as the first option...) But what my script is attempting to do is get the value of the selected option in the combobox of the months then go by the value of that to get their number then are sorted. What I would like to do is make it so it creates a combo box for the days of the month meaning like june = 6 = 30 so it would come out but im not getting how to do this, i even made a combo box on the page and still doesnt work.... Any ideas? Thanks for any help given. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.