Hi,
I have a dropdown1 having the values such as Jan 10,Feb 10,Mar 10 to till date and these values are dynamically being populated from a table. Also I have another dropdown2 having the values such as XYZZ,PQRS etc and I have added these values in a static way and these are not getting populated from a table dynamically.
Finally, I have another textbox2 wherein I need to copy the 1st selected above dropdown 1's value (say in the dropdown1, if Feb 10 is being selected and in the 2nd dropdown2,if I select XYZZ ,then in this textbox2, I need to get as XYZZ0210 but I should also allow the users to edit this textbox2 at a later stage to enter any values of their choice.)
I have already making use of this query posted by Azim earlier and any changes/modifications in this one would be very much appreciated.
function TextBoxChange(text) {
var dropdownvalue = document.getElementById("dd_comp").value;
switch (dropdownvalue.substring(0, 3)) {
case "Jan":
dropdownvalue = "01" + dropdownvalue.substring(6, 3);
break;
case "Feb":
dropdownvalue = "02" + dropdownvalue.substring(6, 3);
break;
case "Mar":
dropdownvalue = "03" + dropdownvalue.substring(6, 3);
break;
case "Apr":
dropdownvalue = "04" + dropdownvalue.substring(6, 3);
break;
case "May":
dropdownvalue = "05" + dropdownvalue.substring(6, 3);
break;
case "Jun":
dropdownvalue = "06" + dropdownvalue.substring(6, 3);
break;
case "Jul":
dropdownvalue = "07" + dropdownvalue.substring(6, 3);
break;
case "Aug":
dropdownvalue = "08" + dropdownvalue.substring(6, 3);
break;
case "Sep":
dropdownvalue = "09" + dropdownvalue.substring(6, 3);
break;
case "Oct":
dropdownvalue = "10" + dropdownvalue.substring(6, 3);
break;
case "Nov":
dropdownvalue = "11" + dropdownvalue.substring(6, 3);
break;
case "Dec":
dropdownvalue = "12" + dropdownvalue.substring(6, 3);
break;
}
document.getElementById("textbox_appnd").value = text.value + " " + dropdownvalue;
}
Thanks a lot in advance!
Regards,