471,599 Members | 920 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 software developers and data experts.

List Box issue

Hi

I am using a listBox which has 31 items.

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. <SELECT NAME=lst_id size=1>
  4.   <OPTION> 1 </OPTION> 
  5.   <OPTION> 2 </OPTION> 
  6.   <OPTION> 3 </OPTION> 
  7.   <OPTION> 4 </OPTION> 
  8.   <OPTION> 5 </OPTION> 
  9.   <OPTION> 6 </OPTION> 
  10.   <OPTION> 7 </OPTION> 
  11.   <OPTION> 8 </OPTION> 
  12.   <OPTION> 9 </OPTION> 
  13.   <OPTION> 10 </OPTION> 
  14.   <OPTION> 11 </OPTION> 
  15.   <OPTION> 12 </OPTION> 
  16.   <OPTION> 13 </OPTION> 
  17.   <OPTION> 14 </OPTION> 
  18.   <OPTION> 15 </OPTION> 
  19.   <OPTION> 16 </OPTION> 
  20.   <OPTION> 17 </OPTION> 
  21.   <OPTION> 18 </OPTION> 
  22.   <OPTION> 19 </OPTION> 
  23.   <OPTION> 20 </OPTION> 
  24.   <OPTION> 21 </OPTION> 
  25.   <OPTION> 22 </OPTION> 
  26.   <OPTION> 23 </OPTION> 
  27.   <OPTION> 24 </OPTION> 
  28.   <OPTION> 25 </OPTION> 
  29.   <OPTION> 26 </OPTION> 
  30.   <OPTION> 27 </OPTION> 
  31.   <OPTION> 28 </OPTION> 
  32.   <OPTION> 29 </OPTION> 
  33.   <OPTION> 30 </OPTION> 
  34.   <OPTION> 31 </OPTION> 
  35.  </SELECT>
  36.  
  37.  
I get a scroll if the items are more than 30.This is the default scroll.
If i have less than 30 items i dont get a scroll.

Is it possible to set the count value for which the scroll must appear. i.e say can i get a scroll after my number of items are more than10.

But i dont want to use "multiple" tag and my "size" attribute must be fixed as 1.
=>With these conditions, how can i make it possible.

Thanks
mailanusha
Nov 23 '07 #1
4 1359
drhowarddrfine
7,435 Expert 4TB
It's not possible. That's what the size attribute is for.
Nov 23 '07 #2
Hi

You need to do like this

1. <html>
2. <head>
3. <style type="text/css">
4. .select_size
5. {
6. font-size: 50;
7. }
8. </style>
9. </head>
10. <body>
11.<SELECT NAME="lst_id" CLASS="select_size">
12. <OPTION> 1 </OPTION>
13. <OPTION> 2 </OPTION>
14. <OPTION> 3 </OPTION>
15. <OPTION> 4 </OPTION>
16. <OPTION> 5 </OPTION>
17. <OPTION> 6 </OPTION>
18. <OPTION> 7 </OPTION>
19. <OPTION> 8 </OPTION>
20. <OPTION> 9 </OPTION>
21. <OPTION> 10 </OPTION>
22. <OPTION> 11 </OPTION>
23. <OPTION> 12 </OPTION>
24. <OPTION> 13 </OPTION>
25. <OPTION> 14 </OPTION>
26. <OPTION> 15 </OPTION>
27. <OPTION> 16 </OPTION>
28. <OPTION> 17 </OPTION>
29. <OPTION> 18 </OPTION>
30. <OPTION> 19 </OPTION>
31. <OPTION> 20 </OPTION>
32. <OPTION> 21 </OPTION>
33. <OPTION> 22 </OPTION>
34. <OPTION> 23 </OPTION>
35. <OPTION> 24 </OPTION>
36. <OPTION> 25 </OPTION>
37. <OPTION> 26 </OPTION>
38. <OPTION> 27 </OPTION>
39. <OPTION> 28 </OPTION>
40. <OPTION> 29 </OPTION>
41. <OPTION> 30 </OPTION>
42. <OPTION> 31 </OPTION>
43. </SELECT>
44. </body>
45.</html>
Nov 27 '07 #3
drhowarddrfine
7,435 Expert 4TB
That is not what he is trying to accomplish and the markup is invalid.
Nov 27 '07 #4
Death Slaught
1,137 1GB
nirchuck please use proper CODE tags around your code.

Also there's no need to capitalize your tags like (this goes to the origonal poster aswell).

Thanks, Death
Nov 27 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Guy Hocking | last post: by
57 posts views Thread by Xarky | last post: by
27 posts views Thread by Tripper | last post: by
65 posts views Thread by Steven Watanabe | last post: by
9 posts views Thread by gamehack | last post: by
4 posts views Thread by phcmi | last post: by
2 posts views Thread by XIAOLAOHU | last post: by
reply views Thread by Anwar ali | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.