How are you passing in the field info to the function? You should be passing it in like stripBadchs(document.MyForm.MyField, "letters"); without quotes around the form field object string. If you have to use quotes or have to build the form field name string to pass in to the function, then add this to the beginning of the stripBadchs function: var idObj; idObj = eval(id); then use idObj throughout that function instead of id. Otherwise, using the following: alert(id.value); should display what you want. Gene > -----Original Message----- > From: owner-kclug@marauder.illiana.net > [mailto:owner-kclug@marauder.illiana.net]On Behalf Of Bradley Miller > Sent: Tuesday, September 03, 2002 1:45 PM > To: Jason Clinton > Cc: kclug@kclug.org > Subject: Re: OT: Javascript help? > > > At 01:28 PM 9/3/02 -0500, Jason Clinton wrote: > >Have id and status been declared as global variable? > > Here's the entire enchilda -- like I said I can't think of how to get the > "id" to refer to my "documents.MyForm.FieldName" properly. The alert box > just says (literally) "documents.MyForm.FieldName.value" and doesn't give > the actual VALUE of that FieldName field. (Price is what I'm trying to > fix, so nobody bozos the $, stuff.) If I change the script to say > "documents.MyForm.FieldName" everywhere instead of the "id" it > works great, > but I can't guarantee that each instance will always be called > "FieldName". > I might add 12 more Price fields (Price1,Price2,etc...) and I would want > the script to work with each of those independently. Does this > make sense ? > > > > >