User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 422,412 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 5,057 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 9437 | Replies: 1
Reply
Join Date: Sep 2006
Posts: 65
Reputation: rpjanaka is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
rpjanaka rpjanaka is offline Offline
Junior Poster in Training

Question get element ID using value

  #1  
Mar 14th, 2007
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2008
Posts: 47
Reputation: ardeezstyle is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
ardeezstyle ardeezstyle is offline Offline
Light Poster

Re: get element ID using value

  #2  
May 23rd, 2008
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.
Last edited by peter_budo : May 24th, 2008 at 6:54 pm. Reason: No need for red colour text
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 9:31 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC