07-14-2009 9:11 AM
Hi expert,
I have a requirement to write a BSP code to open new page in new window after button click. I have done the same for opening in same window but not for opening in new window.
Can you please help me out with the code in which the page opens in new window and the menubar & Addressbar is displayed in hide mode.
07-14-2009 1:42 PM
Hi!
You can write the javascript code in the layout of the bsp application to open a new window here are the sample javascripts for it..
this is the code to open in new window
in the html code it goes as.
<FORM>
<input type="button" value="Button" onClick
write the browser or the page that u want to open forthe above onClick event as ="window.open('www.google.com','mywindow' ,'width=400,height= 200')">
</FORM>
Regards.
07-14-2009 1:42 PM
Hi!
You can write the javascript code in the layout of the bsp application to open a new window here are the sample javascripts for it..
this is the code to open in new window
in the html code it goes as.
<FORM>
<input type="button" value="Button" onClick
write the browser or the page that u want to open forthe above onClick event as ="window.open('www.google.com','mywindow' ,'width=400,height= 200')">
</FORM>
Regards.
06-03-2010 12:53 PM
Richa I know enough javascript ... and ly question was "how can I open a new Internet explorer with a navigation->goto_page .... not a h ref target nor a javascript
08-17-2009 10:35 PM
Hi Rahul,
I have a requirement wherein from an existing BSP page, on click event, I need to call a new URL but not in a separate window. I need to open this new URL in same windw.
Could you please let me know how to achieve this.
Your inputs are appreciated.
Regards,
Manasi T.
08-18-2009 2:09 PM
08-18-2009 2:15 PM
Hi Mansi,
OnInputprocessing:-
DATA: EVENT TYPE REF TO CL_HTMLB_EVENT.
IF EVENT_ID = CL_HTMLB_MANAGER=>EVENT_ID.
EVENT = CL_HTMLB_MANAGER=>GET_EVENT( RUNTIME->SERVER->REQUEST ).
IF EVENT->NAME = 'button'.
DATA: BUTTON_EVENT TYPE REF TO CL_HTMLB_EVENT_BUTTON.
BUTTON_EVENT ?= EVENT.
IF BUTTON_EVENT->SERVER_EVENT = 'mybutton'.
POSITION = W_POSCODE.
NAVIGATION->SET_PARAMETER( NAME = 'POSITION'
VALUE = POSITION ).
NAVIGATION->NEXT_PAGE( 'NEXT' ) .
ENDIF.
ENDIF.
ENDIF.
Note:-
Define Navigation in ur BSP application.
BSP Application -> Navigation Tab
Start -
Navigation Request -
Target
Start.htm (Ur first page) -
NEXT -
Second.hrm(Ur target page which page u r open)
08-18-2009 7:02 PM
Thanks for your inputs,
I already achieved the same on similar lines.
DATA: lv_url1 TYPE string.
lv_url1 = co_model->pv_url.
CALL METHOD runtime->server->response->redirect( url = lv_url1 ).
ENDIF.
The url was determined in the HANDLE_EVENT method of the of the class.