How to show select box items in multiple section in grails - javascript

I am using grails 2.1.1. I have a many select box that contains so much data. Now I want to show 10 items in each display of select. And there should be next previous icon to navigate at bottom of select box. I have goggled for it but found no solution. Is it possible to do it in grails?!! Can anybody help me on this please ?

Related

Userfriendly possibillity to select an icon from large iconset

I have a webapplication where a User can add a new category. The category is beeing inserted to database with form post.
This category should have an icon (bootstrap icons https://icons.getbootstrap.com/) which the User should be able to select.
I use the bootstrap framework 5.1.3 for development.
I can not find a userfriendly possibillity for selecting an item out of 1500.
I have checked using a select element with options in the form. The problem here is that the user only would be able to see the name of the icon but not the image of the icon. Bootstrap does not support adding a image to the options.
Does anyone have an idea how to implement a userfriendly possibillity to choose an icon from a large iconset where the user is able to see the icon before selecting it?
It should be able to save the name of the selected icon in database.
It would be nice if anyone could help me :).
Many thanks to all :)
I suppose you could show a modal with icons rendered with their names and adding onClick property to get the icon which is being selected by the user.
You can also add a search box at top to filter icons by text.
Kind of this: https://react-icons.github.io/react-icons/icons?name=bs

jQuery - having icons at the end of drop down list items with independant actions

Ive looked around a bit and not found anything so im not even sure if this is possible.
What I want to do is have a drop down list. Each list item is a specific type of a view for a list. Is it possible to add an icon at the end that when clicked will fire off a different action to just selecting the item?
So the user opens the drop down. They see View 1. At the end there is a pencil button image. If they select View 1 the list view changes. If they select the pencil it opens up the edit View dialog for that view.
Is this even possible using javascript/jQuery?
It won't be do-able with the standard select element, however it's definitely possible using divs and heavy Javascript/jQuery.
Something similar to how the jQuery plugin Chosen works - it hides the original select element and rebuilds it with divs, adding interaction with jQuery (obviously).

window.history.go() not loading previous user input for dynamically created dropdown lists

I'm having this issue where I have a table that depending on what option I select for the first column, the next column which contains a drop down, will populate with the appropriate values that users can select.
Here's an example
When the user submits the form, they're brought to a results page and have the option of going back to the first screen (where they select the drop downs etc).
Currently, I'm using the window.history.go() function to go back to the previous pages. However, the dynamically created drop downs aren't retaining the value that the user selects (the option that is at the very top of the drop down is always selected).
I'm currently using PHP for the scripts to generate the tables. Is there a way to fix this? Just need someone to point me in the right direction.
Thank you!
u can use history.pushstate(url+'#idx=x') when dropdown changes. and load the param values into dropdown when page loaded

Multi-select dropdown menu

I am working on creating a website using node.js and express. I want to add a multi-select dropdown box. I have a Javascript object which contains a variety of properties and would like to populate the dropdown box with all the property values. I would also like to be able to add new options to the dropdown and have them visible without having to refresh the page. Is there someway to accomplish this? Perhaps using JQuery? I would appreciate if someone could provide an example.
I've tried this example, but I would like to have a multi select checkbox for the dropdown. The example requires the user to press ctrl while clicking to select multiple options.
Thanks!
$("#select_id").append("<option value='value'>name</option>");

dropdown or combo

I need exactly same feature as following dropdown or combo
Typable inside combo and auto complete,
2000 of items or more.
Should not show items list while typing.
Should show items list after pressing downkey or button.
while showing items list, must shows 3 or 4 items at a time and scoll and focus.
Hope you get my problem.
Take a look at jQuery Autocomplete. It has most most features you require, and you can probably customize it to get the rest.
At least you get a solid basis to build upon.

Categories