Re: Javascript Bug?
- From: Marshall Dudley <mdudley@xxxxxxxxxxxxx>
- Date: Thu, 29 Sep 2005 20:27:42 -0400
RobG wrote:
> Marshall Dudley wrote:
> > I followed those instructions, and now if there is only one button, it
> > works as it should, but if there is more than one button, that stopped
> > working. This is what I did:
> >
> > var radioCollection
> > radioCollection =
> > document.CC.elements["Ecom_Payment_Card_Type"];
> > if(typeof radioCollection != "number" ){
>
> You missed a bit-------------------^^
>
> if(typeof radioCollection.length != "number"){
>
> If you are using the code from the FAQ, then look at the length property
> as a way of telling if you have an HTML collection or an element.
>
Bingo! Thanks, I had changed so many things trying to get it to work, I
somehow managed to lose the .length from that conditional. Put it in and
now it is working as desired. (Unfortunately I am a perl programmer that has
little understanding of javascript).
Many Thanks,
Marshall
.
- References:
- Javascript Bug?
- From: Marshall Dudley
- Re: Javascript Bug?
- From: Richard Cornford
- Re: Javascript Bug?
- From: Marshall Dudley
- Javascript Bug?
- Prev by Date: Re: Problems with XML & JavaScript
- Next by Date: Math.pow() variation between Opera/Explorer & Moz?
- Previous by thread: Re: Javascript Bug?
- Next by thread: Re: Javascript Bug?
- Index(es):