Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

How can I change my HTML form ?

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody :
I am workin in a project which involes HTML forms and Servlets.
It is course Test manager which will allow the student to take test online . I want to display the HTML form which contains the first question . The question can be Multiple choice or true or false or short answer type . So the HTML form should change according to the Question type.
How can i do that ? Is there any other better way to do this
rgds
Siva
 
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As for Servlets, sorry to say I haven't worked with them yet, but I am sure it is possible to do this. I am guessing that you have a database or something that has all of the questions, and you want the form to change depending on the type of question, correct?
If that is the case, in your database have a field that says the type of question it is, then when you read it with your Servlet, you will call the class that knows how to handle that particular operation and display the form correctly. Like I said, I have never worked in Servlets, but I had to do something similar to this with ASP once. I got the quetion back from the database, saw it was checkbox, or radio buttons, or etc... and then I called the correct procedure to display the question and possible answers. I would assume servlets would use the same theory, except you would call the correct class, or at least the correct method to display what you want.
Hope that helps some. You may want to ask this in the Servlet forum to get some specefics on the servlet part of the answer. If you have some HTML specefic questions, let me know.
Bill
 
Siva Jagadeesan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Bill:
your information is very helpful
thank you
rgds
siva
 
reply
    Bookmark Topic Watch Topic
  • New Topic