// If the location was changed, lookup the type if it exists
if (type == 'locTypeId') {
locTypeId = element.value;
- typeTypeId = CRM.$( 'select#location_' + blockname + '_' + blockId + '_typeTypeId' ).val();
+ typeTypeId = CRM.$( 'select#location_blocks_' + blockname + '_' + blockId + '_typeTypeId' ).val();
}
// Otherwise the type was changed, lookup the location if it exists
else {
- locTypeId = CRM.$( 'select#location_' + blockname + '_' + blockId + '_locTypeId' ).val();
+ locTypeId = CRM.$( 'select#location_blocks_' + blockname + '_' + blockId + '_locTypeId' ).val();
typeTypeId = element.value;
}