• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

selecting one radio button from a matrix of radio button

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a Jsp page with a radio button matrix like this


Time Name

10-10:30 A O B O C O
11-11:-30 B O C O

here A,B,C are service providers. according to there available timings the above matrix gets generated.

like in the time slot 10-10-30 all the service providers are available , in 11-11:30 only two service providers B,C are available.

The question here is that an end user "D" should be able to select only one service provider for one time slot only.

That means from the above matrix only one radio button should get selected.

I have implemented the code for one service provider.

PROBLEM

when i try to select in the case of multiple service providers all the radio buttons of a row gets selected. I just want only one radio button from the whole matrix to get selected.

I dont know how to handle this.

I cannot post the code as I am working in some organisation.

Please Help

Hints are also appreciated.I understand that without the code much help can't be expected.

Regards :)
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ankita,

Do you mean that from different time slots, user can select one service provider? Considering your example between 10-10:30 I can select either of A,B,C and from 11-11:30 I can select either of B and C. Does that mean I can select two service providers from two different time slots?
 
ankita sarma
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

No from the whole matrix only one selection.

means if I am the end user i can choose only timeslot and hence only one service provider.

I hope that clarifies.
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So, what is the problem are you facing?
 
ankita sarma
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when i am selecting say A for the time slot 10-10:30 then only that radio button corresponding to A should dissapear.

But when I come back to the same screen all the three radio buttons corresponding to timeslot 10-10:30 dissapear.

The problem is If there are say three end users

If one user books a slot of 10-10:30 with service provider A other service providers B and C are still available.

But what is happening in my case is all the radio buttons corresponding to a row are getting disspeared even if only one radio button is getting selected.

how do i diffrentiate between each of them

Note : I am using struts framework.
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Without having some look on your code, it's bit difficult to analyze.
 
ankita sarma
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i know

right now i am using document.forms.getelement[radio.checked].value

for storing the value when i am using single service provider

since in the case of single provider

time name

10-10:20 A O

11-11:30 B O


its like the above case so its easy to handle one radio button in each row

can you suggest how can i use this documents.getelemnt thing for multiple radio buttons in each row??
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ankita,

I tried this with a small html code snippet, not sure if this helps you

 
ankita sarma
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will let you know if it worked or not ;-) wink
 
ankita sarma
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hay thanxxx :-)
 
Swastik Dey
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are most welcome.
 
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic