cancel
Showing results for 
Search instead for 
Did you mean: 

Mark/highlight text in inputField when focused

Former Member
0 Kudos

Hi, how can I mark the text in inputField when it get focus, without using TAB key? We use ENTER to jump to next inputField, and I want the default text to be marked, as in JavaScript xx.select().

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

ChrisPaine
Active Contributor
0 Kudos

Try using the Request_focus method of IF_WD_VIEW_CONTROLLER

[http://help.sap.com/saphelp_nw70ehp1/helpdata/en/2e/a9ed633634494da688855433e105da/frameset.htm]

you could call this from the onEnter event of the input field.

Answers (3)

Answers (3)

Former Member
0 Kudos

marked the question unanswered..

Edited by: Rune Johansen on Oct 6, 2010 2:36 PM

Former Member
0 Kudos

The solution seems to be not perfect.

When I key in a value and touch ENTER very fast the field to be focused, gets focused, BUT the text doesnt get marked!

When I key in a value and touch ENTER at a normal speed or slow, the field will get the focus AND the text gets marked.

What can the reason be?

Am I to fast for the Web Dynpro environment??!

Former Member
0 Kudos

Thanks, exactly what I wanted!