grails and AJAX dynamic search - ajax

I want to organize search by users usernames.
When I write some letters, I want to see list of users,
which usernames start with that letters.
After clicking one of values I have to update users data.
Is there any easy plugin or other way to do it?
I use grail-1.3.2.

You may want to catch the keypress event at the text box: after the user has type, says, 2 letters, use ajax/jQuery to send a request to the server. Then the server perform searching the database and return a list of approriate user.
I once used jquery-ui plugin, and the result is satisfactory.

You may use JQuery Autocomplete to implement such feature... Have a look at the demo..

The Grails UI plugin has autocomplete.

jQuery autocomplete can be a solution... check this link Using Grails with jQuery Autocomplete
There is a demo for using autocomplete in a Grails application.

Related

Laravel 5.6 Ajax autocomplete from an api

I have an external API which returns a list of products and prices. I cant to store this data in the database and I am not interested in displaying the entire list due to some privacy issues. Instead, I would like show a subset of the list with live search / autocomplete. How do I go about it?
This is more of a frontend related thing, give jQuery UI Autocomplete a try.

starting an autocomplete small project

I am not experienced in this field.
I have a database that contains a table with customer names. For example CUSTOMER_T contains
"customer1", "Nick", "Test", etc...I have a web server connected with the DB and let's say a method to get the "customer names". Also I have a small WEB GUI with a textbox, where the customer types a string and invokes the get method that returns the database results.
I want to enhance this functionality with an auto-complete feature, like google suggest. What do I need to install in the server and in the GUI? Please note that the list of customers is dynamic.
Does the server need a special capability - library?
Does the client need a special capability - library?
User JQuery, JQuery UI, and the JQuery UI autocomplete plugin. Start at the autocomplete plugin page.
You can use ajax for autocomplete and as just a query to bring back data in for the textfield

Confirmation message codeigniter

I am setting up a simple CRUD page for my website content and would like to know if codeigniter has any in built functions for displaying confirmation messages.
As I will be giving the user the ability to delete rows from the database I will need a layer of confirmation before they are able to deleted the row.
What is the best method/ suggested way of doing this in codeigniter? I have previously just used javascript, but would like to know if there is another way?
Have you looked into GroceryCRUD? Implementing this might save you some time.
However, your only real options are to use a javascript confirm() dialogue or to direct the user to an intermediary page (another action in your CRUD controller) which provides the user with confirmation options.
If you're aiming to implement the Javascript solution you might wish to consider creating the delete links with javascript too, that way users without Javascript enabled will not be able to delete. This has it's obvious downsides but will prevent users deleting rows without confirming first.

Can jqGrid downgrade if javascript is didabled?

I am currently evaluating grid components for our new portal project. I came across the jqGrid which I find quite interesting. One requirement I have is that the portal should work with javascript switched off.
I found this article on StackOverflow but it does not answer the question. Does anyone can tell me how jqGrid is dealing with this?
In the question which you referenced I could fine the following
Can we create the table using C# and then lay the JS over the top for
extra functionality?
Is it what you plan? Do you want that your portal works without JavaScript and produce pure HTML tables which hold the data without any Ajax requests, but in case of the user do has JavaScript on you want to use JavaScript, jQuery and jqGrid?
In the corresponding answer it was suggested to use tableToGrid function to convert the existing HTML table inclusive the contain to the jqGrid. It seems me the way which you can also follow. Why you are not satisfied with the answer?
To tell the trust I have no customers more where JavaScript is switched off. Do you want to develop the portal for some mobile devices or some other special endpoints which has no JavaScript? In my opinion JavaScript have to be on to be able to use Internet for the better productivity. So the portal which work without JavaScript will have the interface which is not up to date now. Either you have very special customer environment or the requirement seems me too hard.

Single autocomplete extender or plugin for more than one type of search?

I have used the ASP.Net AJAXT Toolkit Autocomplete extender before and I am currently looking at jQuery plugins that handle the same task. I need to find a way to do different type of searches with the same textbox control. The search page of this application has 4 options for search by things like - name - account number - zip code - etc. So I want to change the page method or web method that the extender or plugin uses depending on which radio button is selected. I am not finding any examples of this - only examples of separate textboxes with separate extenders pointing to different page or web methods. Has anyone seen an example of something like this?
You can do this with the jqueryui autocomplete.
I put together a quick crude demo here:
http://jsfiddle.net/8zy44/
Instead of changing the source to a local variable you can also specify a url for the source.

Resources