Solved

<SELECT><OPTION VALUE=array[]>

Posted on 2002-03-12
6
167 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
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem with Pie chart in Jsp 20 206
immutable object concept 5 111
grep code 4 176
How  Can  I  resolve   this  Error "java.sql.SQLException: Invalid column index" 4 26
Note: This is the second blog post in a series on email clearinghouses (https://www.xmatters.com/alert-management/blog-email-has-failed-us?utm_campaign=70138000000ydLoAAI&utm_source=exex&utm_medium=article&utm_content=blog-post).   Every month t…
When rebooting a vCenters 6.0 and try to connect using vSphere Client we get this issue "Invalid URL: The hostname could not parsed." When we get this error we need to do some changes in the vCenter advanced settings to fix the issue.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

861 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now