cancel
Showing results for 
Search instead for 
Did you mean: 

Set Target Frame for Button with server side event

Former Member
0 Kudos

Hello,

does anyone know how to specify the target frame for htmlb:button or xhtmlb:toolbarButton with server event (onClick) ?

I would like to implement a BACK-button in a header frame changing the content of the main frame.

I guess there must be an easy solution, but I did not find anything in SDN or OSS.

Thanks for your help.

Best regards,

Juergen

Message was edited by: Jürgen Bey

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Target frame for a button alone is not an option, you’ll have to declare the target frame while declaring the form which contain your back button, an in the event processing block for OnClick event you could navigate/redirect to the page you want to go to.

When you specify the target frame, the navigation processing will impact the target frame and not the header frame/ the frame your button is in..

FYI. You could possibly have multiple forms in the header each having it’s own target frame.

*********Example************

<htmlb:form id="form1" target = “frame2” >

<htmlb:button id="btn_BACK" text="BACK" onClick = "GOBACK" onClick="btn_go"/>

</htmlb:form>

*********Event Handling*****

IF event_id = cl_htmlb_manager=>event_id.

DATA: htmlb_event TYPE REF TO cl_htmlb_event.

htmlb_event = cl_htmlb_manager=>get_event( runtime->server->request ).

id = htmlb_event->if_htmlb_data~event_id .

CASE id.

WHEN 'btn_text'.

navigation->goto_page('<Page to go to>').

ENDCASE.

ENDIF.

Former Member
0 Kudos

Perfect, that solves my problem.

I was not aware of the fact that this must be done in the form tag and that I can use multiple form tags in a bsp.

A lack of html knowhow, obviously.

Thanks for your immediate response.

Juergen

Answers (1)

Answers (1)

Former Member
0 Kudos

Did you check the sample BSP Application in transaction se80 "SBSPEXT_HTMLB" or "IT00" or "ITSM" or any of the others I seem to remember one dealing with the whole navigation issues.