Hai
u can write the code like this
<form name=form>
<select name=choice>
<option value="Y">X</option>
</select></form>
where x is the choice u want to give and Y is the value of the choice X.
To go to any other field after selecting the choice u can write a script
like
onChange="goto()"
<script>
function goto(){
if(form.choice.value==y){
alert("Hello")
}else
alert(" Sorry not a valid choice !")
}
</script>
In the above script instead of alert(Hello) u can write what ever function
u want to perform.
Vinay Talwar
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Gene Campbell
<[EMAIL PROTECTED]> To: [EMAIL PROTECTED]
Sent by: "A mailing cc:
list for discussion Subject: Re: Displaying Selections
about Sun
Microsystem's Java
Servlet API
Technology."
<SERVLET-INTEREST@jav
a.sun.com>
02/21/01 01:40 AM
Please respond to "A
mailing list for
discussion about Sun
Microsystem's Java
Servlet API
Technology."
I would use WebMacro. Serve up an array of objects that represent the
choices in your select box. Then associate that object with a WebMacro
template. In that template you would have something like this.
<SELECT>
#foreach $item in $listOfItems {
<option name=$item.name>
}
</SELECT>
I'm sure my HTML isn't right there, but I figure you'll get the idea.
WebMacro is found at www.webmacro.org. I've heard recently there's
something else called Velocity that is easier to use that WebMacro. You
can find that at the Apache site.
If, of course, you want to do it the old fashion way, just print out the
html necessary to build the <SELECT> through the response object.
good luck.
- gene
>Hi All,
>I have a set of search fields. I would like to display in a selection box
>each time a user selects a category. How could I do this.
>
>Thanks
>roy
>
>
___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html