PDA

View Full Version : can i divide html select box equally for dynamic inputs


vinodkalpaka
06-04-2004, 12:49 PM
can i divide html select box equally for allocating dynamic datas from two different fields ,that is in a same database table.

here is the section of vbscript code in asp file




<select name="sid1" class="form_selectfieldLong">
<option value="select"> -- Select -- </option>
<%

rss.movefirst
while not rss.EOF
str1=rss("SName")
lens=Len(str1)
lens1=0
lens1 = 30-lens
'lens1=cint(lens1)
if isNull(lens1) =false then

if lens >30 then
str1=Left(str1, 30)
else
for i = lens to 30
str1 = str1 & "&nbsp;"
next

end if

else
for i = 0 to 30
str1 = str1 & "&nbsp;"
next
end if

str2= rss("IName")
leni=Len(str2)
if leni >30 then
str2=Left(str1,30)
end if

%>
<option value='<%=rss("SID")%>'><%
response.Write(str1& " | &nbsp;" & str2)%></option>
<%
rss.movenext
wend
rss.close
%>
</select>


different width of characters affect my result.
Is there any property for the select box for this type of division.

please help me.
Thanking in advance.

from
vinod