radio button in jsp

i have ten questions in my jsp page ...each question have 4 radio button to choose one as answer ....But for me .. Totally only one i can choose for 40 radio buttons ....Message was edited by: kannankalli
[239 byte] By [kannankallia] at [2007-11-27 7:59:57]
# 1

Let me get this straight, you want 10 sets of 4 radios buttons each but the behaviour you're getting is that of 1 set of 40?

I think the problem is that you've given all 40 radio buttons the same name. That makes them one group of 40. This means that only one of the 40 can be selected.

What you should do is give every set of 4 the same name and each set a different name from the others i.e. you'll have 10 different names for 10 groups of radios buttons with 4 radios buttons in each set sharing the name but with a different id and value.

BTW, this isn't a Java problem, it's HTML basics :)

nogoodatcodinga at 2007-7-12 19:41:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
i got this problem in jsp while designing question with radio button ,so its related to javaBut anyway thanks a lot .. i solve this problemMessage was edited by: kannankalli
kannankallia at 2007-7-12 19:41:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Well, not really, the behaviour is still HTML...but no point arguing :)And how did you solve it? You should let us know so that others could benefit, perhaps.
nogoodatcodinga at 2007-7-12 19:41:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
10 names for each set of button i stored in database ..each time i iterate from the FOR LOOP i connected to the database and i get value from it . that value i passed it to name of radio button ..
kannankallia at 2007-7-12 19:41:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
So the problem was that all 40 buttons had the same name?
nogoodatcodinga at 2007-7-12 19:41:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
No .. one name for each question ....
kannankallia at 2007-7-12 19:41:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7
But the radio buttons were for the answers...
nogoodatcodinga at 2007-7-12 19:41:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 8
now i have another problem .......... how i can disable the buttons after certain period of time for each question ... i came to know that can be done by using timer of java script .. i don't know how do i implement this ?Message was edited by: kannankalli
kannankallia at 2007-7-12 19:41:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 9
Cross Post: http://forum.java.sun.com/thread.jspa?messageID=9725145
nogoodatcodinga at 2007-7-12 19:41:51 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...