File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Reference to a LABEL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Reference to a LABEL" Watch "Reference to a LABEL" New topic

Reference to a LABEL

Phillipe Rodrigues
Ranch Hand

Joined: Oct 30, 2007
Posts: 165
I've assigned a module for development using JSP,Servlet.I dont know how to proceed for the below:

A dropdwn list with LABEL MyHobbies and options: A,B,C.

Now the code should be as For MyHobbies there should be a name assigned which can be used as a reference to MyHobbies label.
I should refer to that refernce in my program to check which one of 3 (A,B,C)values is selected.

Where and how should I set reference to a LABEL?

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870

The label element has nothing to do with finding out which value was selected in a select control. On the page, the value attribute of the control will yield the current selection; after submission, the value of the control will be submitted using the name attribute assigned to the control.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Reference to a LABEL
It's not a secret anymore!