Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Nov 2005
    Posts
    148
    Thanks
    1
    Thanked 0 Times in 0 Posts

    how can i refer to dynamic creted of radio button?----urgent

    Hi!,

    i had created few ground of radio button. the number of ground was based on some data in database.

    i had assign each group with different name.
    for example, group one as radio_btn_1, group two as radio_btn_2 n .......

    how can i access to all radio button???

    i try using getElementById(radio_btn_1).length....if show out value "undefined"..

    i try access with getElementById(form_name).radio_name.length. it aslo cant show out the length of radio button.... i had assign "radio_name = 'radio_btn_1'".......


    how can i access to each radio button?????

    isnt got a way that can unchecked radio button in a group without noe which radio button in a group had be checked?

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    document.getElementsByName('radiogroupname')

    ...will return the collection (very much alike with an array) of all the radio buttons (the gruoup) with the name='radiongroupname'. To acces one, or all the elements in that collection you kave to circle with a loop whithin them.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •