Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: trying to put in a variable in a naming convention


Message #1 by John Espinosa <johndanielespinosa@y...> on Thu, 9 May 2002 12:19:02 -0700 (PDT)
Hi John,

> Yea that is the code that I have already.

Nope, I altered the code so that it worked!!!

> Now I put the value of each checkbox to be exactly the
> same as the name of the hidden field. But I cannot get
> the value of the hidden field with the name of the
> value of the checkbox to print in the text area.

Try...

function display(CheckBox){

document.forms.myForm.myTextArea.value+=document.forms.myForm[CheckBox.value
].value;
 }

But why not just store the value as the checkbox value rather than in a
hidden field, then use...

document.forms.myForm.myTextArea.value+=CheckBox.value;

HTH,

Chris




  Return to Index