*
The moose likes HTML, CSS and JavaScript and the fly likes how to add checkbox values to a javascript array? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to add checkbox values to a javascript array?" Watch "how to add checkbox values to a javascript array?" New topic
Author

how to add checkbox values to a javascript array?

Ajay Xavier
Ranch Hand

Joined: Jan 03, 2005
Posts: 109
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.
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
i guess you can use javascript to populate a javascript array with the kid of checkboxes you want.

Javascript array usage is as follows
var arrayName = new Array();
fill up the array with the html checkbox objects.


Life called,so here I am.<br />Cheers<br />Niki.:-)
 
GeeCON Prague 2014
 
subject: how to add checkbox values to a javascript array?