What I want is if someone changes the contract field on edit/update then the calue of the Codes field is set to empty.
This is what I have so far, but its not working, no error messages either.
can anyone point me in the right direction?
Code: Select all
var dv = AppGiniHelper.DV;
dv.ready(onReady);
function onReady() {
type_id_init();
}
function type_id_init() {
var fieldname = "Contract";
var field = new AppGiniField(fieldname);
// register onChangeHandler (listener)
field.onChange(onTypeIdChanged);
}
function onTypeIdChanged() {
hideOrShowFields();
}
function hideOrShowFields() {
// fade in common fields
$j('#Codes').val('');
}