• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to add checkbox values to a javascript array?

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic