This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to add checkbox values to a javascript array?

 
Ajay Xavier
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i hope this is one of the right places to post this query.

In my JSP page i have 10 Checkboxes (generated through <html:multibox> .

In this 10 checkboxes some should be user editable and some should not be. This is determined by a value associated with the form bean. Initally during the page load all the 10 checkboxes will be selected by default.

For some reason, I need to keep track of editable and non editable text boxes. I thought of adding the values of the non editable check boxes to an array in javascript.

How to intialize the array with the non editable checkbox values?

Regards,
Ajay
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following code looks at every checkbox on the page and puts the value of each into an array if it is unchecked.
 
Ajay Xavier
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for your reply.

In my case all the check boxes will be checked initially so if try to store the values based
on the "checked" status it will return the values of all the check boxes. So i guess i cannot
proceed in that way.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic