cancel
Showing results for 
Search instead for 
Did you mean: 

Open new Window Properties...

Former Member
0 Kudos

Hi,

I am using tableview iteratror..by using the foll code,

<i>

bee = cl_htmlb_link=>factory( id = taskid

reference = link

text = 'press me'

target = '_blank').

</i>

on clicking the link a new page is opening.How to control the newly opened window properties ?

Is it similar to that of javascript ..(scrolling=no,width=100,height=200) ?

Thanks in Advance.

Rgds,

~J.Banupriya

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

use the parameter onClientClick to provide the javascript function name that is gonna be called, and then, in the view where you pass the code of your bee, you create the javascript function.

<script language=javascript>

function myopen() {

myWindow=window.open("test2.htm", "test2", "target=_blank, fullscreen=no, toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no, width=800,height=600,left=0,top=0");

}

</script>

bee = cl_htmlb_link=>factory( id = taskid

reference = link

text = 'press me'

<b>onClientClick = 'myopen()'</b>

target = '_blank').

Former Member
0 Kudos

yes.It's coming.

I want to pass the parameter(empno?='1000' from the controller to the javascript.How to achiev it ?

Rgds,

J.BP

Former Member
0 Kudos

Hi,

well, it should not be much difficult. Just pass the value as parameter in the function:

function <b>myopen(value)</b> {

<b>url = "test2.htm";

url = url + "empno?=" + value;</b>

myWindow=window.open(url, "test2", "target=_blank, fullscreen=no, toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no, width=800,height=600,left=0,top=0");

}

</script>

bee = cl_htmlb_link=>factory( id = taskid

reference = link

text = 'press me'

<b>onClientClick = 'myopen(1000)'</b>

Former Member
0 Kudos

onClientClick = 'myopen(1000)'

This works fine ..

But if i try to put variable in place of '1000' it's returing error...

<i>

assign component p_column_key of structure <fs> to <l_applnt>.

wf_text = <l_applnt> .

call method cl_htmlb_link=>factory

exporting

id = p_cell_id

  • reference = wf_url

onClientClick = 'myopen(wf_text)'

target = '_blank'

receiving

element = p_replacement_bee.

</i>

Thanks nd Regards,

JBP.

Former Member
0 Kudos

Well that cannot work, because 'myopen(wf_text)' is a string, and the javascript will be generated like this.

Do something like this.


data lv_client_clink type string.

concatenate '''myopen(' wf_text ')''' into lv_client_click.

then:

call method cl_htmlb_link=>factory
exporting
id = p_cell_id
onClientClick = lv_client_click
target = '_blank'
receiving
element = p_replacement_bee.

Former Member
0 Kudos

No..This also not working...

Rgds,

JBP.

Former Member
0 Kudos

Hi,

Instead of passing 'myopen(wf_text)', try to concatenate 'myopen(' wf-text ')' into some variable w_tmp and pass w_tmp to onClientClick.

Regards,

Arun.

Former Member
0 Kudos

Thanks...

Problm was in concatenation...

Rgds,

JBP

Answers (0)