How to achieve suggestions in input field - javascript

Hi I had come across a question how to achieve suggestions in the input field while typing for example (in browser url bar while we typing first 3 to 4 letters it give suggestion if the url is correct we go with it else with single delete key press remove the suggested content). This need to be done with input field. Is this scenario is possible? Thanks.

There's a big range of possibilities here.
If the contents of the list are static or easily generated via code, you can use a native HTML <datalist> element.
If you are wanting autocomplete in the form using the user's previously-provided data, you can just enable via the <input autocomplete> attribute
If you're wanting far more customization, it's going to have to be some JavaScript that does the dirty work for you. Stack Overflow is not a good forum for getting library suggestions, but you should survey what's available in your current development stack.

This is absolutely achievable, have a look at - typehead.js
It's a javascript project for doing exactly what you're asking, I believe it's compatible with boostrap too.

Autocomplete suggestions are a very common Web Component. If you are using jQuery, you might want to try this component published by Materialize. If you are using, say, Polymer, you might want to try paper-autocomplete. If you are using vanilla javascript, you could try typeahead, or something like this autocomplete library. Most other modern web frameworks will have some alternative. I wouldn't really recommend making one from scratch.

Related

Is there a way to use Filtrify that has outdated jquery with bootstrap that needs higher versions of jquery?

I really like the Filtrify plugin with the multiple search categories like on this link http://luis-almeida.github.io/filtrify/movies.html by Luis. It is perfect for my project but I'm using bootstrap as a framework and this plugin uses version 1.7.1 of jquery and bootstrap needs 1.9.+. Is there a way so I can use both or is not possible? If not, do you guys know of similar plugin that I can use ? I need to be able to search multiple items and filter content by those items. My first try was to use the instafilta but then I can only search for one item at a time, unless I don't know how to configure it.
So to be exact, the Filtrify demo that I posted is exactly what I need.
This is the content of my project. I want to be able to search for for example Javascript and C++ and filter the users that have that in their list.
http://i.imgur.com/NlWP0oO.jpg
This is my first post so I hope this is specific enough.
Thanks in advance.
Maybe take a look at "http://isotope.metafizzy.co/". It has a filter function, too.
filtrify.js line 99: change the if statment with this
field = this._order[f];
This is an old problem, but I was able to fix the jQuery conflict of using newer jQuery with Filtrify by using method 1 on this page: https://www.sitepoint.com/fix-jquery-browser-function/

Is there any JSP equivalent for text editor as we use in ASP.net

i am designing a website where user can enter text in a formatted way, i have worked in asp.net where i have used AJAX toolkit and used HTML text editor control. i require similar kind of feature but i don't know how to achieve this feature in jsp.
As you will be answering this question you will be doing some formatting below, i just want to implement the similar kind of feature.
I couldn't show my work as this problem is what i have to solve first. Please let me know how can i do this. !
but i am talking of the answer box of stack overflow or similar
thanx...
If you want a free version then use TinyMCE. It is fast and uses jquery and setting it up is really easy and you can buy it to activate other features too.
But if you want to pay for it then you can use Cute Editor, from my experience you need to buy licence per domain.
javascript editor
jHtmlArea http://jhtmlarea.codeplex.com/
ckeditor http://ckeditor.com/
tinymce http://www.tinymce.com/
http://medleyweb.com/resources/10-best-free-javascript-or-jquery-wysiwyg-html-editors/

Need good HTML content editor for ASP.NET

I need a Javascipt text editor which can be used to write posts by portal users. It should provide at least some text formatting and image stored on other sites insertion. Moreover, really important things is a solution to filter text on server side to get rid of security issues. I'm using the ASP.NET platform.
There is lots of options if you are not needing to use the control in an update panel:
FreeTextBox (Seems to be the most ASP.NET friendly, haven't used)
TinyMCE
AJAX Toolkit HTML Editor
CKEditor
The situation where you run into problems when using these with ASP.NET is when they are wrapped within update panels. There are many annoyances setting the hooks in place to trigger the controls to update upon the async postback and refresh themselves when the request ends. I have spent many hours attempting to get these to work with update panels with much frustration.
Related Question...
If you like the editor on SO, you could use it: WMD and MarkdownSharp.
Try TinyMCE http://tinymce.moxiecode.com/
There's a crossover here with this question (assuming you want to use jQuery of course):
https://stackoverflow.com/questions/1141073/whats-the-best-wysiwyg-editor-for-use-with-jquery

Javascript Click/Drag and Select Table rows and columns

I am wondering if anyone knows a java script library that would add a "select" type of functionality as seen in excel/google docs where you can click and select several different parts of a row and/or column. I am looking at adding this functionality to my web application. Does anyone know where of library's preferably in java script that will be able to add this.
Thanks in advance
jQuery has a plugin called pfSelect which provides the kind of functionality that I think you are looking for. You could take a look at that. And if you're not using jQuery, I'm pretty sure that every major JS ui library has this kind of functionality (Dojo's Grid, ExtJS' ArrayGrid, YUI's DataTable, etc.).

YUI Checkbox Button - retrieving the checked value

(I've tried posting this on YUI message group but without any luck)
Can anyone tell me how to retrieve the checked state of a yui Button? I've tried by creating the Button in code, which is then outputted as a HTML button but this only changes the title attribute.
When I use checkboxes instead, none of the checkboxes are checked (when iterating through them with jQuery).
Is there an easier way of doing it? Say with the 3.0 Node API, or Element?
EDIT:
To clarify how this problem came about, I'm using the YUI ASP.NET controls. They add controls to the page like this
Sys.Application.add_init(function() { $create(YUIAspNet.Button, {"ButtonID":"yuiMyButton_btn","ButtonName":"yuiMyButton$btn","TabIndex":0,"ButtonType":"checkbox","Text":"Technology"}, null, null, $get("yuiMyButton"));});
So as you can see, finding all buttons is not as simple as I'd like it to have been.
Sorry are you talking about checkbox buttons? Use:
myButton.get("checked")
where myButton is an instance of YAHOO.widget.Button.
Chris, I am the starter of YUI ASP.NET project. I watch the YUI mailing list regularly, I must of missed your question.
I have a more general answer for you and anyone else having the problem and ending up reading this, not just for checkbox button, but for all controls.
On the client, you can have access to the YUI object by calling the .get_YUIControl() method on the custom wrapper client object, then you have the control over the original YUI object. The YUI documentation is very good, and you can find a good description for what you'd like to accomplish.

Categories

Resources