I have a list box on an asp page that is populated by a field in a database that could be like 60 or 70 characters long.
The problem is that this creates a HUGE list box widthwise. I want to limit the screen display to 15 characters:
so what i did was this:
which does in fact work to truncate the characters the populate the combo box.
The problem is that I am then trying to use the value of that combo box to update another field in that database, and the field only gets updated with that truncated value.
While I only want to show the first 15 characters in the combo box, I don't want the actual value that gets passed to be truncated to the first 15 - I need the full length.
How do I do this? Q: Why is my computer doing that?
A: Random Perversity of Inanimate
Objects
The problem is that this creates a HUGE list box widthwise. I want to limit the screen display to 15 characters:
so what i did was this:
Code:
<select name="cboMemEntity" width="10">
<option selected><%= rsMembers("Entity")%></option>
<%
do while not rsEntities.EOF Response.Write "<option>"
Response.Write left(rsEntities("Entity"),15)
Response.Write "</option>"
rsEntities.MoveNext
Loop
%>
</select>
which does in fact work to truncate the characters the populate the combo box.
The problem is that I am then trying to use the value of that combo box to update another field in that database, and the field only gets updated with that truncated value.
While I only want to show the first 15 characters in the combo box, I don't want the actual value that gets passed to be truncated to the first 15 - I need the full length.
How do I do this? Q: Why is my computer doing that?
A: Random Perversity of Inanimate
Objects