Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

TextField javascript: select some Text with selStart/selEnd

Avatar

Former Community Member
Hi,



I try to preselect some text content within a TextField via javaScript.

I found some documentation, which states that in the change-Event I could set the selStart and selEnd Attributes by a script.: When a change or full event occurs, if characters were selected in the field, selStart and selEnd

are set to bracket the selected characters.



I tried this, but it did not work for me.



Any Ideas on how to preselect some text in a TextField by script?



Many thanks in advance
0 Replies