Hi
I Have a ADD form with the following fields
Address (text field)
City (dropdown with lookup in table city with 'ID','cityName' fields showing cityName )
Province(dropdown with lookup in table province with 'ID','provinceName' fields showing ProvinceName)
Country (text field)
FullAddress (calculated value with AJAX as address+City+province+Country)
I am trying to calculate and fill the value of FullAddess with the following Javascript but I get the ID for files City and Province and I need the displayed Name. I mean CityNAme and ProvinceName
function OnPageLoad(pageid){
var ctrlAddress = Runner.getControl(pageid, 'Address');
var ctrlCity = Runner.getControl(pageid, 'City');
var ctrlProvince = Runner.getControl(pageid, 'Province');
var ctrlCountry = Runner.getControl(pageid, 'Country');
var ctrlFullAddress = Runner.getControl(pageid, 'FullAddress');
function func() {
var temp=ctrlCity.getDispElem() .val()
ctrlFullAddress.setValue(ctrlAddress.getValue()+', '+ctrlCity.getValue()+', '+ctrlProvince.getValue()+', '+ctrlCountry.getValue());
};
ctrlAddress.on('change', func);
ctrlCity.on('change', func);
ctrlProvince.on('change', func);
ctrlCountry.on('change', func);
}
Javascript functions ctrlCity.getValue() and ctrlProvince.getValue() are showing ID values instead of Displayed Values.
Is there any way I can get the Displayed Name with Javascript ???
Help !!!
Thanks
MAC