I have a child form that updates a parent form.
The field on the parent form is called "t_1".
I am using the following javascript to update its value:
opener.document.form2.t_1.value=TaskId;
This works fine the value of the variable TaskId is filled in fine. But what I really need is to replace the t_1 in the javascript line with a variable field name, so that I can update fields such as t_2, t_15, t_22 etc.
I am a VB.Net programmer, with limited javascript skills looking for the correct syntax to make it happen.
I have a variable called tcount that should take the place of the t_1 field name. Here is the variable declared:
var tcount= 't_' + QueryString('tcount');
So in theory I want the statement, opener.document.form2.tcount.value=TaskId;
But that is the wrong syntax and causes an error.
Any ideas?
The field on the parent form is called "t_1".
I am using the following javascript to update its value:
opener.document.form2.t_1.value=TaskId;
This works fine the value of the variable TaskId is filled in fine. But what I really need is to replace the t_1 in the javascript line with a variable field name, so that I can update fields such as t_2, t_15, t_22 etc.
I am a VB.Net programmer, with limited javascript skills looking for the correct syntax to make it happen.
I have a variable called tcount that should take the place of the t_1 field name. Here is the variable declared:
var tcount= 't_' + QueryString('tcount');
So in theory I want the statement, opener.document.form2.tcount.value=TaskId;
But that is the wrong syntax and causes an error.
Any ideas?