dotkpay Posted December 21, 2010 Share Posted December 21, 2010 Hello, Am trying to find the code for a mini select form, one where the list doesn't drop down but a user click an up or down button and the options change. The problem is that I don't even know what they are called. Thanx in advance Quote Link to comment https://forums.phpfreaks.com/topic/222304-up-and-down-select-form/ Share on other sites More sharing options...
Maq Posted December 21, 2010 Share Posted December 21, 2010 I'm not clear as to what you want the list to look like but maybe a listbox. AFAIK, you will have to use JS for the up/down arrows. Something like this maybe: http://viralpatel.net/blogs/2009/06/listbox-select-all-move-left-right-up-down-javascript.html Quote Link to comment https://forums.phpfreaks.com/topic/222304-up-and-down-select-form/#findComment-1149946 Share on other sites More sharing options...
dotkpay Posted December 21, 2010 Author Share Posted December 21, 2010 I meant the ones used for example by dating sites during registration for users to input their exact age. Imagine a user selecting his age from a list of 18-120 years. They are the size of a small text field with just up & down buttons. I can't seem to find a site using them at the moment cause I would have just looked through the page's source. Thanx for your efforts. Quote Link to comment https://forums.phpfreaks.com/topic/222304-up-and-down-select-form/#findComment-1149983 Share on other sites More sharing options...
Maq Posted December 21, 2010 Share Posted December 21, 2010 I think I know what you mean but do you have an example? Quote Link to comment https://forums.phpfreaks.com/topic/222304-up-and-down-select-form/#findComment-1150003 Share on other sites More sharing options...
haku Posted December 22, 2010 Share Posted December 22, 2010 This is done with javascript. You will add your buttons beside the select, and when they are clicked, the year is increased/descreased. You can also use a textfield and change the value of the textfield if you prefer this. The advantage of using a select however though is that even if the user has javascript disabled, they can still use the element and are restricted to the values provided. Quote Link to comment https://forums.phpfreaks.com/topic/222304-up-and-down-select-form/#findComment-1150126 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.