Hi Vertika,
Maybe you can try using the javascript button. This allows you to execute javascript before executing a microflow.
https://appstore.home.mendix.com/link/app/27064/Mendix/JavaScript-Button
Also it might help to share your javascript.
Hi Austin, Thank you for the reply. I downloaded the JavaScript button.mpk from app store but I don't see it in Add-Ons or in Project Explorer. How I'm supposed to use JS button in modeler?
My current js code is:
$('.focusField').find('input:first').focus();
where '.focusField' is class assigned to all input fields that needs to be focused at some click.
Earlier, I tried:
$(document).ready(function () { $('input[type="text"]').on('click', function () { this.select(); }); })
and before that, I tried:
var btn = $('.orangeBtn').eq(5); btn.click(function() { $('.focusField').find('input:first').focus(); });
where '.orangeBtn' is the class assigned to buttons in different divisions and will be clicked at some point. (this code worked fine in JSFiddle online editor).