TextBox Autofocus not working in Mendix

1
I’m completely new to Mendix application . while creating TextBox Autofocus is not working while user login application . Is it required to create any custom widget ?  
asked
1 answers
0

Hi Priya,

Add the javascript widget in the page and use the below code 

$(document).ready(function() { //Wait for all dom-elements to be rendered

try{

let inputstextbox=$('.focusonme')[0].firstChild; // find input-element of focusonme

if (typeof inputstextbox !='undefined'){ // check if you have found one

inputstextbox.focus();

}

}

catch (error) {}

});

 

Thanks,

Ragul.

answered