cancel
Showing results for 
Search instead for 
Did you mean: 

In the same BSP, open a htm from another

Former Member
0 Kudos

hello,

I search in the forum to open a htm page from another when I click a button.

I have only one bsp with 2 pages with flow logic.

I found something like that :

from my "first_page.htm", I use a flag in OnInputprocessing : w_open_page = 'X'.

In the layout, I test my flag

if w_open_flag = 'X'

windows.open(('secondpage.htm', 'width=100, height=200');

endif.

But it doesn't work.

If I put in Oninput processing of my firstpage.htm : navigation->goto_page('secondpage.htm')

it works but I can't manage the size, the toolbar...

Can someone help me please ?

Thanks

Regards

Véronique

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

you can use the following code

<htmlb:button id            = "DEFS"
                           text       = "Button Text"
                           onClientClick = "javascript:window.open ('secondpage.htm', '_blank', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=550,left = 200,top = 100');" />

Raja

Answers (2)

Answers (2)

Former Member
0 Kudos

Raja,

Thanks a lot, it is exactly what I need, and it works. Great !!

Have a nice day.

Véronique

raja_thangamani
Active Contributor
0 Kudos

Véronique

If it worked pls reward Durai Raj.

Raja T

Former Member
0 Kudos

Hi,

Here in you your case, you will have to do a bit of mixing between ABAP and JavaScript...

What you can do is write a openWindow function as follows :

function openWindow()
{
<% IF w_open_flag = 'X' %>
windows.open(('secondpage.htm', 'width=100, height=200');
<%ENDIF.%>
}

Then in your button, you'll have to call openWindow using onClientClick...but this will only take the previous stored value of w_open_flag, before the server round-trip...

Hope this helps.

<b><i>Do reward each useful answer..!</i></b>

Thanks,

Tatvagna.