what is the exact value of vID and what is the exact name of the field?

a couple of things that I can see that are potentially giving you headaches:

1) JS is case sensitive.  jobcodecombo02 is not the same as jobCodecombo02
2) the name of the field is jobcodecombo02 but instead of passing '02'
you're passing '2'



On 12/20/05, Adkins, Randy <[EMAIL PROTECTED]> wrote:
> 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?
>
>
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227328
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