I am longer able to set text box values via javascript when the watermark control is applied to a control. I stepped though the js in VS2008 and the debugger show that the value was updated but the watermark was still there.
Here is the actual js code I am using it returns from the a string array from the server {City,State}.
The "city" text box has a watermark.
function CheckZipCode(txtZipID, txtCityID,ddlStateID ) {
var txtZip = document.getElementById(txtZipID);
var ddlState = document.getElementById(ddlStateID);
var txtCity = document.getElementById(txtCityID);
if (txtZip != null && txtState != null && txtCity != null) {
if (validate.ZipCode(txtZip.value)) {
var objFields = { txtCity: txtCity, txtState: txtState, txtZip: txtZip };
PageMethods.GetZipCodeDate(txtZip.value, CheckZipCodeSuccess, CheckZipCodeFail,objFields)
}
}
}
function CheckZipCodeSuccess(objResult, context, senderName) {
if (objResult!=null) {
forceBlur(context.txtCity);
context.txtCity.focus();
context.txtCity.value = objResult[0];
context.ddlState.value = objResult[1];
}
}
function CheckZipCodeFail() {
}