Skip to Content
Author's profile photo Former Member

Capturing F4 keypressed event in HTML and HTMLB input fields using Javascript validations

  • event handler for checking and processing user input and

  • for defining navigation

IF event_id = CL_HTMLB_MANAGER=>EVENT_ID.

  • Read event from manager.

  DATA: event_data TYPE REF TO IF_HTMLB_DATA.

  event_data = CL_HTMLB_MANAGER=>get_event_ex( request ).

  if event_data->event_defined = ‘input1’.

  • Action for input1

  endif.

  if event_data->event_defined = ‘input2’.

  • Action for input2

  endif.

ENDIF.

You can also use this to create custom input field help. Key press events for other function keys can also be captured. You can get keycodes of all keys from the below link. Just replace the keycode in the application.

Keycodes

Summary :

I have mentioned a way to capture F4 key pressed event in html and htmlb input elements using javascript validations.

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Lakshmi K
      Lakshmi K
      You have given the code in 3 boxes. Are the first two, 2 different pages ?
      Author's profile photo Former Member
      Former Member
      Hi First is for html input fields.
      second & third is for htmlb input fields.