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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

How can I add more text input base on users selection

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I have a dropdown list, user can make selection, and I need to add one or two more text input field depends on the selection. I guess I can use Javascript to handle the event, can some one tell me how to do that?
I have code like this, it used struts_html.tld
<html:select property="selectedVerification" >
<html ption value="">--Please select a verification--</html ption>
<html ption value="0"> Verification--Scores </html ption>
<html ption value="1"> Verification--Health Insurance </html ption>
<html ption value="2"> Verification--Good Studend Discount</html ption>
<html ption value="3"> Verification--Degree </html ption>
</html:select>
if user selected "Verification--Degree", I want add two more text input field, one for "startDate", one for "endDate".
if user selected "Verification--Good Studend Discount", I just need add one more text input for "semester".
please help.
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
This is really a HTML/JavaScript question, and thus will probably get more sensible answers in the HTML/JavaScript forum. With that in mind, I've moved this post over there for you.
 
Kan Qiu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
but I need implement this in JSP. and I am using struts_html tag library.
 
Sheriff
Posts: 67502
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Regardless of how the page is generated, JSP or otherwise, handling the client-side interaction needs DHTML.
bear
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
do not cross post! This one is closed
 
LOOK! OVER THERE! (yoink) your tiny ad is now my tiny ad.
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic