forms selct box
Moderator: General Moderators
-
FireElement
- Forum Commoner
- Posts: 86
- Joined: Wed Oct 17, 2007 6:03 pm
forms selct box
My google skills are getting worse I think?
Anyways I just wondered if there was away to change the length of a select box.
Say if I had 100 options how would i make only 10 show in the drop down box.
That way the select box would be more user friendly! Is it possible?
Anyways I just wondered if there was away to change the length of a select box.
Say if I had 100 options how would i make only 10 show in the drop down box.
That way the select box would be more user friendly! Is it possible?
-
FireElement
- Forum Commoner
- Posts: 86
- Joined: Wed Oct 17, 2007 6:03 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
There is little actual control over that as it is drawn primarily by the host operating system with most browsers.
The only control we can (in some cases) exert over it is by setting the height value of the options, but be careful as the host system may not check those values and draw the box too large or off-screen.
This is a client-side question.
The only control we can (in some cases) exert over it is by setting the height value of the options, but be careful as the host system may not check those values and draw the box too large or off-screen.
This is a client-side question.
-
FireElement
- Forum Commoner
- Posts: 86
- Joined: Wed Oct 17, 2007 6:03 pm
so basically not unless you use javescript? If its really complex then am not the bothered really just thought it was not listed because it was obvious.
Reminds me of the prime number formula.... there isnt one but you think there would be! i been close a few times but in the end the only patern I see is that all prime numbers after the first few of course all end in 1 3 7 or 9 also that any new prime numbers that accure knock out any what would seem like a prime number. Bascailly in other words you get 13 it will take out 39 it looks like prime but is not because 13 took it out. In other words prime numbers pattern is not possible because a previous prime number makes it random so you have to check every number that look like a prime with all prime numbers below half it self. eg all primes belwo 19.5 in 39 case to check its not a prime.
I dont really know why I said that guess I was just bored and decided I would have ago at breaking it again....
Anyways I may look in to javascript on it. To be honest I was not that fussed.
Reminds me of the prime number formula.... there isnt one but you think there would be! i been close a few times but in the end the only patern I see is that all prime numbers after the first few of course all end in 1 3 7 or 9 also that any new prime numbers that accure knock out any what would seem like a prime number. Bascailly in other words you get 13 it will take out 39 it looks like prime but is not because 13 took it out. In other words prime numbers pattern is not possible because a previous prime number makes it random so you have to check every number that look like a prime with all prime numbers below half it self. eg all primes belwo 19.5 in 39 case to check its not a prime.
I dont really know why I said that guess I was just bored and decided I would have ago at breaking it again....
Anyways I may look in to javascript on it. To be honest I was not that fussed.
-
devendra-m
- Forum Contributor
- Posts: 111
- Joined: Wed Sep 12, 2007 3:16 am
refer http://www.hotandco.com/
select netherlands in the country field then you will get city field filled with cities. In that city field you can either type or select directly
select netherlands in the country field then you will get city field filled with cities. In that city field you can either type or select directly
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
Normally when I have a problem like this I start to look at w3schools.com but it doesn't seem to be working today. Aside from core HTML which doesn't do what you want surely the answer lies in where you are getting the information from in the first place. If it is PHP it is easy enough to only show the first ten, to randomise it or rank it. This would be better than a pure javascript solution.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
-
FireElement
- Forum Commoner
- Posts: 86
- Joined: Wed Oct 17, 2007 6:03 pm
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Not sure if you can control the number of items shown in a select box before causing a scroll. I think this is controlled by the browser, which also controls whether the box opens up or down depending on placement in the viewport at the time the box is activated.FireElement wrote:I was looking to just make a the drop down part of a select box only display ten items and a scroll if more then ten was in.
Just so it was neater.