I have an Acrobat form with a dropdown box (cboFirstDay) that has two options; Sunday or Monday. I'm using the following code to populate the second day text box (txtSecondDay). If I select Sunday the second day text box will display properly the Monday value. If I select Monday in the drop down box, the second day text box still displays the Monday value. I'm very new to javascript, so any help here will be greatly appreciated. — Ken
var FirstDay=this.getField("cboFirstDay").value;
if (FirstDay="Sunday") {
this.getField("txtSecondDay").value="Monday";
} else {
if(FirstDay="Monday") {
this.getField("txtSecondDay").value="Tuesday";}
}
The code is in the Mouse Up event of the drop down box.
Also included the .value in the if statement.
Hope that helps,
Niall
ps Also the test in the if statement needs a double equals sign "=="
Hope this helps,
Niall
Assure Dynamics