hi all,

in my form there are number of checkboxes that is dynamically generated. accordig to the user,s action (when going to edit a record), i want some of them are checked using javascript.

but i dont have id of checkboxes that i want to check, only have the value of the check boxes. so is it possible to get the element ID using the value of the element.

thanks..
janaka priyadarshana

Hi !

Since the checkboxes are generated dynamically, you can have the number of new chechboxes generate each time. Based on that you can easily have the chechbox id. I mean for instance the id of the checkbox is chk1, then it is obvious that chk will be common for all the ids and by incrementing it will become easy.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.