I am not an IT professional, I have made a script and running over a website through Tampermonkey
Website code:-
<div id="__grid1-wrapperfor-__label44" class="sapUiRespGridSpanL1 sapUiRespGridSpanM3 sapUiRespGridSpanS6 sapUiRespGridSpanXL1">
<span id="__label44" data-sap-ui="__label44" class="sapMLabel sapUiSelectable sapMLabelRequired sapMLabelMaxWidth DCA-FormLable" style="text-align: left;">
<span id="__label44-text" class="sapMLabelTextWrapper">
<bdi id="__label44-bdi">Truck No</bdi>
</span>
<span data-colon=":" class="sapMLabelColonAndRequired">
</span>
</span>
::after
</div>
<div id="__grid1-wrapperfor-__xmlview3--truckNumber" class="sapUiRespGridSpanL2 sapUiRespGridSpanM3 sapUiRespGridSpanS6 sapUiRespGridSpanXL2">
<div id="__xmlview3--truckNumber" data-sap-ui="__xmlview3--truckNumber" data-ui5-accesskey="" class="sapMInputBase sapMInputBaseHeightMargin sapMInput DCA-FormField" style="width: 100%;">
<div id="__xmlview3--truckNumber-content" class="sapMInputBaseContentWrapper" style="width: 100%;">
<input id="__xmlview3--truckNumber-inner" value="" type="text" autocomplete="off" class="sapMInputBaseInner">
</div>
</div>
</div>
I want to go to next input of bdi
id through Jquery
Earlier the site was using label
Id instead of bdi
and my code was working very fine
My Code:-
$("label:contains('Truck No')").parent().next().find('input').attr({
maxlength: "10",
Autocomplete: "OFF",
list: "ABC",
Placeholder: "TRUCK NUMBER",
autocapitalize:"ON"
}).after('<Datalist ID=ABC></Datalist>');
i have changed label
to bdi
in my code but doesn’t work
Page image
pls help experts
2
Answers
changing the label to bdi should work the same way as when it was a label
Hope this helps
You can use sap ui5 framework API.