document.getElementById('').value for input TYPE=radio , not working?

Discussion in 'JavaScript' started by kuser, Aug 5, 2012.

  1. #1
    Hello, Please check this script:

    http://latinotimes.com/feeder/feed.php

    Please change the category and you will see the code is working just fine for <select> but it's only showing the first value=X of a radio , just click on CUSTOM/QUICK or PHP/HTML and you will see it's not working...
     
    kuser, Aug 5, 2012 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    Well first you should drag your html kicking and screaming out of the dark ages, and get all those elements you are MISSING into the markup like LABEL and FIELDSET... since using a table that way is not what tables are for.

    Radio buttons share NAME, but again ID's have to be unique -- to get the value you have to check the value of EVERY radio button by it's UNIQUE ID, not just the one.... so you have to check #codelang1, #codelang2, etc, etc down the line.

    Wait, that is what you are doing for reading them -- did you get that sorted because it seems to be working as it should here.

    Well, apart from the horrifically outdated and inaccessible markup.
     
    deathshadow, Aug 6, 2012 IP