Hello,
When the search fields are formed into group, the operator triggers event like in the following picture:
This is because the source codes in line 412~415 in method CL_THTMLB_ADVANCEDSEARCH->IF_BSP_ELEMENT~DO_AT_BEGINNING as mentioned by Vitaliy:
It seems difficult to implement your requirement using just Javascript, as a comparison, when group event is added for the sales org operator, the Javascript is this:
<input name="C28_W48_V115_V116_search_PARAMETERS[1].OPERATOR" id="C28_W48_V115_V116_search_PARAMETERS[1].OPERATOR__key" onkeydown="if(htmlbEnterKey(event)){htmlbEF('thtmlbShowAdvancedSearchFields\x28\x22C28_W48_V115_V116_search_PARAMETERS\x5b1\x5d.OPERATOR\x22\x29\x3b');return htmlbEL(this,15,'C28_W48_V115_V116_search_PARAMETERS[1].OPERATOR:thtmlbGroupScenarioOperatorChange');;}" onclick="htmlbEF('thtmlbShowAdvancedSearchFields\x28\x22C28_W48_V115_V116_search_PARAMETERS\x5b1\x5d.OPERATOR\x22\x29\x3b');return htmlbEL(this,15,'C28_W48_V115_V116_search_PARAMETERS[1].OPERATOR:thtmlbGroupScenarioOperatorChange');;" type="hidden" value="EQ"/>
.
when normal operator is used, the javascript is :
<input name="C28_W48_V115_V116_search_PARAMETERS[4].OPERATOR" id="C28_W48_V115_V116_search_PARAMETERS[4].OPERATOR__key" onkeydown="if(htmlbEnterKey(event)){htmlbEF('thtmlbShowAdvancedSearchFields\x28\x22C28_W48_V115_V116_search_PARAMETERS\x5b4\x5d.OPERATOR\x22\x29\x3b');return htmlbEventCO(this,'select','htmlb:dropdownListBox:select:null','myFormId','C28_W48_V115_V116_search_PARAMETERS[4].OPERATOR','',0);;}" onclick="htmlbEF('thtmlbShowAdvancedSearchFields\x28\x22C28_W48_V115_V116_search_PARAMETERS\x5b4\x5d.OPERATOR\x22\x29\x3b');return htmlbEventCO(this,'select','htmlb:dropdownListBox:select:null','myFormId','C28_W48_V115_V116_search_PARAMETERS[4].OPERATOR','',0);;" type="hidden" value="EQ"/>
...
If you want to make changes on javascripts, it should be a large project. Maybe you don't need to create a Zcl_thtnmb, but make a simple modification on line 377 in method CL_THTMLB_ADVANCEDSEARCH->IF_BSP_ELEMENT~DO_AT_BEGINNING, and set your own LV_ON_OP_SELECT for your fields which need to trigger events.
Then you enhance the component/view BT108S_LEA/Search, add your own event method, then redefine method CL_BT108S_L_SEARCH->DO_HANDLE_EVENT to add the logic to call your own event method.
Best Regards, Corrine