Hi, I use the input_SetFocus widget to set the cursor in the SearchInput field together with an onfocus extended property to select the text already present in the input field. This works fine.
I wonder ... does OutSystems provide a more simple way (one statement or so) to achieve the same result?
Charles Betman wrote:
Or Create an action with this Javascript:
(Call action RunJavaScript from HTTPRequestHandler Extension)
Input Param is your textbox
"osjs('#" + WidgetId + "').focus();"+ "osjs('#" + WidgetId + "').select();"
Hi Charles,
Not really, but you can easily create a web block that encapsulates that functionality so that you don't have to repeat it over and over.
Cheers,
Tiago.
Hello Charles Betman
The solution proposed Fábio Vaz works and it deserve that you mark it as a solution. This way you can help others like me that had the same problem.
TIA
Alberto Ferreira wrote:
Done Alberto ;)
Thanks.
I need the same requirement but just not to select the text on focus instead need to show the cursor at end of the field. How can I do?