Hello
I have two textfield and dropdown, i want add date to the first textfield and when change dropdown menu add year or month dynamically to the second text-field
any help?
| SitePoint Sponsor |

Hello
I have two textfield and dropdown, i want add date to the first textfield and when change dropdown menu add year or month dynamically to the second text-field
any help?
You need JavaScript for that. Try googling for 'AJAX'.
Guido - Community Team Advisor
Do you know where the (database) error is? Add it to the list!
Thinking Web: Voices of the Community
Blog - Free Flash Slideshow Widget

I know but how?

i used this code but it give me
NaN/NaN/NaN
Code:function calDate() { var dateArr = document.getElementById('date_field1').value; var date1 = new Date(); date1.setFullYear(dateArr[2],dateArr[1]-1,dateArr[0]); date1.setDate(date1.getDate()+5); document.getElementById("date_field2").value = date1.getDate() + "/" + (date1.getMonth()+1) + "/" + date1.getFullYear();
Bookmarks