Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Client Side Scripting
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 09-15-2005, 02:23 PM
  #1
jwnelson
Novice (Level 1)
 
Join Date: Sep 2005
Posts: 1
iTrader: (0)
jwnelson is an unknown quantity at this point
White Space Handling

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">&nbsp;</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> &nbsp;<%
int numberOfClients = clients.size();
int clientShowSize = 5;
if (numberOfClients < 5) {
clientShowSize = numberOfClients;
}
Iterator clientList = clients.iterator();
%> &nbsp;&nbsp;&nbsp;<SELECT name="clients" size="<%=clientShowSize%>">
<%
while (clientList.hasNext()) {
String client = (String)clientList.next();
%>
<OPTION><%= client %></OPTION>
<%
}
%>
</SELECT><BR>
&nbsp;<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>

Last edited by jwnelson : 09-15-2005 at 02:33 PM.
jwnelson is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-21-2005, 09:50 PM
  #2
RetroGamer1991
Soldier (Level 11)
 
Join Date: Sep 2001
Posts: 147
iTrader: (0)
RetroGamer1991 is on a distinguished road
dont use &nbsp;

put the spaces in quotes

Code:
"       whatever "
you may have to mix your quotes, use single and double, but you need to put them in some kind of quotes in your ASP code
RetroGamer1991 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 11:11 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.