cancel
Showing results for 
Search instead for 
Did you mean: 

return value to tableview-field in opener document

helmut_sieberer
Participant
0 Kudos

Hello to everybody !

first of all: it is my fist posting.

I read a lot of the posting and it was a great help for my first BSPs.

Thanks to everybody.

Now my Question:

i have a htmlb:tableView where the user can push a button for help-values for a field.

i can open and pass a value to the help-popup (thanks to that forum)

but now i want to return the selected value. i read that this is possible with opener.document.form.field.value, and i guess this is only possible with normal inputfields. but how do i get the value in the right line of the tableview?

thanks to everybody

Greets Helmut

Accepted Solutions (1)

Accepted Solutions (1)

helmut_sieberer
Participant
0 Kudos

Hello !

just for testing i did it like this, but it doesn't work...

<script>

<% selected_tableview_column = '4'. %>

<% selected_tableview_line = '1'. %>

opener.document.mainform.id_tv_inhaber_<%=selected_tableview_line%>_<%=selected_tableview_column%>.value=<%=zugehoer1%>;

window.close();

and also for testing if i write this it works...

opener.document.mainform.id_tv_inhaber_1_4.value=<%=zugehoer1%>;

thanks

Former Member
0 Kudos

Are you getting some Java Script Error?

Orelse is the value is not getting populated in the table view?

Regards,

Ravikiran.

Former Member
0 Kudos

Hi Helmut,

how are selected_tableview_column and selected_tableview_line are typed. I would guess that there are blanks rendered.

As a try:


<%
data script type string.
concatenate 'opener.document.mainform.id_tv_inhaber_'
selected_tableview_line
'_'
selected_tableview_column
'.value='
zugehoer1
';window.close();'
into script.

condense script no-gaps.

%>
<script>
<%=script%>
</script>


Regards

Message was edited by: Sebastian Behne

Answers (5)

Answers (5)

helmut_sieberer
Participant
0 Kudos

Thanks very much !

sometimes the simple things make it hard...

helmut_sieberer
Participant
0 Kudos

Hello !

following your suggestion

i tried this one, but it doesn't work:

<script>

<% selected_tableview_column = '4'. %>

opener.document.mainform.id_tv_inhaber_<%=selected_tableview_line%>_<%=selected_tableview_column%>.value=<%=zugehoer1%>;

window.close();

</script>

Greets

Former Member
0 Kudos

Are you passing the value of the attribute <i>selected_tableview_line</i> from the main page to the other page. A similar code, works for me!!

Regards,

Ravikiran.

helmut_sieberer
Participant
0 Kudos

Hello !

thanks for your answers.

it is almost done.

but my script does not work.

can anybody tell me, why it doesn't work?

<script>

opener.document.mainform.id_tv_inhaber_<%=selected_tableview_line%>_4.value=<%=zugehoer1%>;

window.close();

</script>

the form in the opener is mainform and

the tableview id is id_tv_inhaber and

selected_tableview_line has the right linenumber.

Thanks very much

Helmut

Former Member
0 Kudos

<i>>>opener.document.mainform.id_tv_inhaber_<%=selected_tableview_line%>_4.value=<%=zugehoer1%>;</i>

inplace of this "4.value=<%=zugehoer1%>", keep the column no. selected, just as kept in the case of line number. Hope this will solve your problems.

Assign points by selecting the radio buttons on the left side, for replies you found helpful.

Regards,

Ravikiran.

Former Member
0 Kudos

Hi Helmut,

Welcome to SDN!!!

You can pass the value, in the case of Table View Cells also. In this case you have ID of Input field generated automatically for you. Say if you are passing the value to a particular cell 1st Row 2nd Column, then the input field ID would be in this format: <tableview ID>_1_2.

<i><tableview ID>_<row no.>_<column no.></i>

You can use this id in the JS opener.document.form.field.value

Hope this helps,

Regards,

Ravikiran.

Former Member
0 Kudos

Welcome to sdn Helmut!

If you have a look into the rendered html in your browser you will see that that each cell has its row in its name-attribute. The best solution is to give the id to the valuehelp as parameter.

Regards