I have a form that has dynamic fields that are generated such as:

 

jobCode1

jobCode2

jobCode3

.....

 

 

I have a button next to each field that will popup a window of codes to
be selected

And the popup window will have the ID associated with each form field
such as 

1, 2, or 3...

 

On the popup window, when you select a code, it calls a JS function on
that page

Called CodeSelected(vCode,vID) 

vCode = actual code

vID = ID associated to the formfield on the parent page.

 

I was trying to write this dynamically and I know it is simple to do,
just escapes me

right now.

 

Here is the function:

<SCRIPT LANGUAGE="JAVASCRIPT">

            function CodeSelected(vCode,vID){

                        var fldLoc = 'jobCode'+vID;

window.opener.document.forms[0].[fldLoc].value = vCode;

                        self.close();

            }

</SCRIPT>

 

However the problem is nothing is being written back to the opening
page. If I 

Hardcode the field as the following it works just fine:

window.opener.document.forms[0].jobcodecombo02.value = vCode;

 

How can I make this dynamic?

 

 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227326
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to