Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript .NET
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 14-Feb-11 0:48am
Sri9797505
Comments
Monjurul Habib at 14-Feb-11 14:38pm
   
Please share your code to help you out where is the problem.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^].
  Permalink  
Comments
Sri9797 at 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
digital man at 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 at 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 at 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).
digital man at 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)

  Print Answers RSS
0 OriginalGriff 7,800
1 Sergey Alexandrovich Kryukov 7,072
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,790


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 10 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100