Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I want to iterate all the check boxes and check the status whether it is checked or not.

My controls are on a content place holder and all the pages are in master pages.

I'm unable to do with "for(i=0;document.FormName.Elements....."

Please suggest me alternatives.


Thanks & Regards
Sri
Posted
Comments
Monjurul Habib 14-Feb-11 14:38pm    
Please share your code to help you out where is the problem.

1 solution

Did you even bother to try Googling?

Found this in less than 10 seconds: will get you started:

How to loop through checkboxes or radio button groups via JavaScript[^].
 
Share this answer
 
Comments
Sri9797 14-Feb-11 6:00am    
thanks digital man

your suggestion is for controls in forms. I need it for controls in a content place holder. Master pages concept.

looping in a form - I know that. I'm looking to loop controls in a child window which has a content place holder.

regards
Sri
R. Giskard Reventlov 14-Feb-11 6:12am    
You've missed the point: a content place holder will still exist in a form so you should be able to access all of the properties pertaining to those controls as long as they have a valid and unique client id that the JavaScript can find.
jkirkerx 10-Apr-13 13:11pm    
Mark gave you the correct answer, based on the small hint you gave in your post or question.

if you meant doing it on the server side upon page postback, them you need to improve your question to get your desired answer.

Meant for the op, I did hit reply in first comment, strange or bug?
Sri9797 14-Feb-11 6:23am    
I'm sorry

I think there will be no forms in the concept of maaster pages.
can you please paste here a simple code bit(for loop).
R. Giskard Reventlov 14-Feb-11 6:44am    
You can reply to a comment rather than creating a new comment: hover over the comment and you will see a reply button.

Have you actually looked at the mark-up in your master page? What do you see? I won't post any code since this is really basic stuff: if you don't know it go do some research.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900