[thelist] what is wrong with this JS function?

Chris W. Parker cparker at swatgear.com
Mon Mar 10 12:42:00 CST 2003


Erik Mattheis <mailto:gozz at gozz.com> wrote:

> > With this function I get these results:
> >
> > Default: ""
> > 1st change: "AA"
> > 2nd change: "AADDAA"
> >
> > 1. Why is it doing this?
>
> Because you're including the text input too. You want to say:
>
>   if (currentForm.elements[iCtr].type == 'select-one') {
>    outputText += currentForm.elements[iCtr].value;
>   }

ooooooohhhhh i seeee... at first i didn't understand what you meant, now i do.


thanks for you help erik.

chris.



More information about the thelist mailing list