Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript





Problem:

1) User selects Option Three in the page and once again expands combo box.

2) Here User will see 2 items expanded on top (optionone,optiontwo) and two items at the bottom(optionfour,optionfive)

3) If user selects item “optionfive” all the four items will be shown on the top of the combo box on next expansion.

How to show all the list item on bottom ir respective of whatever is selected.

#142455
Paulie_D
Member

This will require a JS solution I feel.

#142481
Eric Gregoire
Participant

Native select boxes are tough to work with in that way. I’m not really sure what you can all dig into when it comes to select boxes if there’s anything at all. You may have to think outside the [select] box. :)

SelectBoxIt :: http://gregfranko.com/jquery.selectBoxIt.js/ has some neat features that you may find useful. I’m not entirely sure if it will be powerful enough to accomplish what you want to do, but it’s a heck of a lot more flexible.

Otherwise, just search for another JS select box replacement.

#142482
Paulie_D
Member

Actually, I think this is the default behavior in IE10 **only**.

See this discussion which is similar…

https://css-tricks.com/forums/discussion/26741/select-box-issue-with-ie-10#Item_5

#142484
Eric Gregoire
Participant

I totally misread this somehow as a how-to. Yeah, it seems that the select box will be at the mercy of whatever browser it’s being displayed in.

If it’s really a big deal for whatever reason, here’s a reference of the objects and methods you can call to help you formulate your own solution perhaps with the way the indexes are ordered :: https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement

#142910
james7979
Member

Folks,

Any easy way to fix this problem. It is kind of looking ugly if combo box has 20+ values.

Any other alternatives.

#142899
Paulie_D
Member

>Any easy way to fix this problem.

Nope…other than a complete “hide the element (display:none) and JS re-write” etc.

http://www.jankoatwarpspeed.com/reinventing-a-drop-down-with-css-and-jquery/

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.