on 09-21-2006 11:53 AM
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
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').
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
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.
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.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.