Hi.
I have a form with a dropdown list of users and a radio button that controls whether to fill in the dropdown field automatically or to have a user fill it in.
If the user fills it in, the database lookup trigger that is set to fire on the dropdown list field works fine. However, when the dropdown is filled in automatically with Javascript, the lookup isn't triggered.
How can I get a database lookup to be triggered when the dropdown field value is selected with Javascript?
Here's the script I've got:
function setDropdownValue() {
// this is the radio button that determines whether the user has to choose from the
// dropdown or whether the value should be filled in automatically
var reqFor = $('input[name="Field77"]:checked').val();
// This is the value that will be used to automatically fill the dropdown field
var usrdispname = $('#q164 input').val();
if (reqFor == 'me') {
// set the field value automatically
$('select[id="Field147"]').val(usrdispname);
// $('#Field147 input').trigger('change');
} else {
$("#Field147").val("");
}
}