473,326 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Struggling with listbox height

1
Hello all, I found a slight problem that is puzzling me

What I want,
- When I have a drop down box on a screen it should be size=1.
- When I click on the drop down box, ALL values should be displayed
- When I click on a value in the drop down box, the value should be selected and the drop down box should close (to size=1)

The above works great if there are 11 or less items in your drop down box. If there are more then a scrollbar will be shown on the right side. I do not wish the scrollbar to appear, I want to show all values without the need to scroll.

I managed a sorta workaround but I lose the functionality of the drop down box, that the values of the drop down box appear above the screen without altering the layout of the screen.
So I want best of both worlds: all values should appear in the dropped down box when I click on it without altering the layout of the page it is on
I can best explain it with my examples:



Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <form action="">
  4. TEST1
  5. <select name="cars" >  
  6.   <option value=" "> </option>
  7.   <option value="volvo">Volvo</option>
  8.   <option value="saab">Saab</option>
  9.   <option value="fiat">Fiat</option>
  10.   <option value="audi">Audi</option>
  11.   <option value="audi">Audi2</option>
  12.   <option value="audi">Audi3</option>
  13.   <option value="audi">Audi4</option>
  14.   <option value="audi">Audi5</option>
  15.   <option value="audi">Audi6</option>
  16.   <option value="audi">Audi7</option>
  17.   <option value="audi">Audi8</option>
  18.   <option value="audi">Audi9</option>
  19.   <option value="audi">Audi10</option>
  20.   <option value="audi">Audi11</option>
  21.   <option value="audi">Audi12</option>
  22. </select></p>
  23. TEST2
  24.  
  25. <select name="cars" onClick="size=1" onMouseOver="size=16" onMouseOut="size=1"
  26.    >  
  27.   <option value=" "> </option>
  28.   <option value="volvo">Volvo</option>
  29.   <option value="saab">Saab</option>
  30.   <option value="fiat">Fiat</option>
  31.   <option value="audi">Audi</option>
  32.   <option value="audi">Audi2</option>
  33.   <option value="audi">Audi3</option>
  34.   <option value="audi">Audi4</option>
  35.   <option value="audi">Audi5</option>
  36.   <option value="audi">Audi6</option>
  37.   <option value="audi">Audi7</option>
  38.   <option value="audi">Audi8</option>
  39.   <option value="audi">Audi9</option>
  40.   <option value="audi">Audi10</option>
  41.   <option value="audi">Audi11</option>
  42.   <option value="audi">Audi12</option>
  43. </select></p>
  44. </form>
Apr 2 '08 #1
2 1534
eWish
971 Expert 512MB
This is an issue with the onMouse function not an HTML issue. Moving thread to JavaScript.

--Kevin
Apr 3 '08 #2
hsriat
1,654 Expert 1GB
onClick="this.size=1"

See if this works...
Apr 3 '08 #3

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

Similar topics

6
by: R.Wieser | last post by:
Hello All, I'm trying to get a "Virtual Listbox" to work. I've currently got a form, and used CreateWindowExA to create a ListBox with the LBS_OWNERDRAWFIXED and LBS_NODATA flags on it. I've...
1
by: Patty O'Dors | last post by:
Hi I have some code to create an ownerdrawn listbox (derived), and when I add an item to it, the bold text of the first item (the title, 'Collections and Maturities') mysteriously seems to get...
1
by: Dan Bass | last post by:
I'm looking to develop a listbox with in-place editing where as each item is selected, it grows to fit in all the text boxes. When the item is deselected, it shrinks back to its original size. The...
1
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What...
1
by: yamne | last post by:
I have a problem. When I click in edit datagrid button I show two listbox and two button. I use two button to move data between two listbox. My problem is that I can't call the listbox in the...
4
by: Moe Sizlak | last post by:
Hi There, I am trying to return the value of a listbox control that is included as a user control, I can return the name of the control but I can't access the integer value of the selected item,...
4
by: Bob P. | last post by:
Hello, I have a page with: * two side-by-side asp:listboxes and two arrow asp:buttons allowing users to add/remove email addresses between them -- very much like Outlook, where you have the...
0
by: David J | last post by:
Hi, I am strugling with the propertygrid and a listbox. I am using the universaldropdowneditor from the codeproject (code below). However I am populating the listbox via a datasource. The problem...
3
by: Hugh O | last post by:
Hi, There is a ROW property on the Web Listbox control within VB.Net. The description states it is "The number of visible rows to display". I have tried setting this property in many different...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.