jwnelson
09-15-2005, 02:23 PM
How do I preserve whitespace within an element of a list selection. I am presenting a list of clients for single selection, but if I have a selection that has additional spaces in it, the spaces are removed when presented in the browser
I want to preserve the additional space within the client name presented in the list.
eg. 1
<TABLE border="0" width="876">
<TBODY>
<TR>
<TD height="10"> </TD>
</TR>
<TR>
<TD width="700" valign="top">
<FORM method="POST" action="<%=applicationHome%>/transferID" name="theForm">
<TABLE width="100%">
<CAPTION align="left"><B>Select Client ID</B></CAPTION>
<TBODY>
<TR>
<TD height="5"></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD width="45%">
<FIELDSET><LEGEND align="top">Clients</LEGEND> <%
int numberOfClients = clients.size();
int clientShowSize = 5;
if (numberOfClients < 5) {
clientShowSize = numberOfClients;
}
Iterator clientList = clients.iterator();
%> <SELECT name="clients" size="<%=clientShowSize%>">
<%
while (clientList.hasNext()) {
String client = (String)clientList.next();
%>
<OPTION><%= client %></OPTION>
<%
}
%>
</SELECT><BR>
<BR>
</FIELDSET>
</TD>
</TR>
<TR>
<TD height="5"></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD width="45%" valign="top" align="center"><INPUT type="submit" name="action" value="Continue"> </TD>
<TD width="5%"></TD>
<TD width="45%"></TD>
</TR>
</TBODY>
</TABLE>
</FORM>
</TD>
</TR>
</TBODY>
</TABLE>
I want to preserve the additional space within the client name presented in the list.
eg. 1
<TABLE border="0" width="876">
<TBODY>
<TR>
<TD height="10"> </TD>
</TR>
<TR>
<TD width="700" valign="top">
<FORM method="POST" action="<%=applicationHome%>/transferID" name="theForm">
<TABLE width="100%">
<CAPTION align="left"><B>Select Client ID</B></CAPTION>
<TBODY>
<TR>
<TD height="5"></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD width="45%">
<FIELDSET><LEGEND align="top">Clients</LEGEND> <%
int numberOfClients = clients.size();
int clientShowSize = 5;
if (numberOfClients < 5) {
clientShowSize = numberOfClients;
}
Iterator clientList = clients.iterator();
%> <SELECT name="clients" size="<%=clientShowSize%>">
<%
while (clientList.hasNext()) {
String client = (String)clientList.next();
%>
<OPTION><%= client %></OPTION>
<%
}
%>
</SELECT><BR>
<BR>
</FIELDSET>
</TD>
</TR>
<TR>
<TD height="5"></TD>
<TD></TD>
<TD></TD>
</TR>
<TR>
<TD width="45%" valign="top" align="center"><INPUT type="submit" name="action" value="Continue"> </TD>
<TD width="5%"></TD>
<TD width="45%"></TD>
</TR>
</TBODY>
</TABLE>
</FORM>
</TD>
</TR>
</TBODY>
</TABLE>