Solved

<SELECT><OPTION VALUE=array[]>

Posted on 2002-03-12
6
171 Views
Last Modified: 2010-05-18
I know this is more html than jsp, but I'm executing it in a jsp.  Can I assign an array to the value of an option?

Like this:

<SELECT><OPTION VALUE=array[]>    


200 pts.--a ridiculously gernerous question.
0
Comment
Question by:RUSTY
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 6857092
can you maybe output the array as a comma delimted list.. and put that as the value?

CJ
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 6857097

like this?

  <OPTION VALUE='<%=array[0]%>'><%=array[0]%></option>
0
 
LVL 6

Accepted Solution

by:
kotan earned 200 total points
ID: 6859115
You can't assign an array to the value of option.
What you can do is extract all the value and put a delimeter like comma(,) or pipe(|) in between.

Here is the sample code:

<option value="
<% for (int i = 0; i < array.length; i++) { %>
  <%=array[i] + "|"%>  
<% } %>
"></option>
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:cheekycj
ID: 6861147
kotan: Isn't that what I suggested in my first comment?
0
 

Author Comment

by:RUSTY
ID: 6861169
cheekyci give hint, kotan give answer.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6861185
Kotan.. gave an example of how to do my approach.

Anyhow, as long you got your desired answer.

CJ
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
error when compiling my project in eclipse luna 30 543
using if condition without JSTL 2 119
excpetion with multiple catch 11 141
Can't access image with tomcat/html 6 114
By reading this blog, MSPs will gain insight into how to improve communications with their clients as well as establish a more profitable business.
An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question