This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CheckBox and Database interaction  RSS feed

 
nash avin
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I would like to thank everyone for their advice to me in these forums.I have another situation here.Hopefully this is the right forum to post this message.

I have a .jsp page which contains checkboxes.The jsp is arranged into
COURSES SECTION and QUESTIONS.

Under each one of them there are check boxes.Under the COURSES and SECTION column, the checkboxes have associated values obtained from an Access database.

The QUESTIONS column has checkboxes, that have hard coded values(questions), written in html.The answers to these questions lie in a MS Access database.

I would like to know how I can check some checkboxes(checkbox value is already obtained from the Access database as told) in COURSES, some in SECTION(value already obtained from the database) and some in QUESTIONS , so that I can get the answer to that specific question I have checked pertaining to the COURSE and SECTION.Hopefully I have explained my problem correctly.

Any help would be greatly appreciated once again.Some leads as to how it could be done, along which lines.

TIA
AS
 
Frederic Filiatrault
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tia,

Ok. Here`s some modest suggestion to help you out.

First I would consider putting your questions in the DB. So your JSP files will be smaller (with a FOR loop) and also, will let you create the question list dynamically (so, any changes after you will automatically reflected).

Second, always in DB, I would create a table for the association between your question mapping with the correct COURSES * SECTION.

one thing FOR SURE, I you want to do it dynamically, I strongly suggest that you use JavaScript on the client side to interact with the client`s selection.

So, you will have (with your JSP file) to load into the HTML, the answer values. I would load them a pure JavaScript variable declaration (like an array). This way, all your answers would be ready to be found with your JavaScript.

I`m almost 100% sure of my solution.
But I do encourage other people to suggest other (and maybe better) solutions.

I love those kind of question !!!
 
nash avin
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for the suggestion.I will see what best can be done regarding what you have told.Will post for further enquires.

Thanks again
AS
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!