I need to find out how to have a search bar that can find other pages on my site. Doing a google search, I can only find the code to create a search bar, and not utilise it. Its features would need to include auto correct and actually going to the page, basically these 2 things combined (https://www.w3schools.com/howto/howto_js_autocomplete.asp and https://www.w3schools.com/howto/howto_js_filter_lists.asp)
In the how to filter/search list example you can just add the urls to the corresponding links like <li>Adele</li>.
And in the how to js autocomplete example it will be a bit different and additional code needs to be written. If the url is the same as the items in the list there would not be an issue, but otherwise you need to make the array of countries into an array of objects so that each object will have the name of the country and the corresponding url. Then in the javascript function you will have to access the components as arr[x].country.
The array of countries should look something like this
`var countries = [{country:"Afghanistan", url:"afghanistan"}, {country:"Albania", url:"albania"},...}.
Then add an onClick event handler in the javascript function.
onClick="location.href=`www.example.com/${arr[x].url}`"
You can use Tipue search for that. It's easy and has many options. Like related links, search description, pagination.
It's very easy to customize, if you know how to use inspect element or javascript.
http://www.tipue.com/search/
Related
Does anyone know a JavaScript package that allows to create a multi-keyword filter query like for example the searchbar of Kibana. StackOverflow, Trello and Gitlab have similar capabilities, but not all have support for multiple filters at once or don't have autocomplete for all possible search filters.
I am looking for something similar to select2 with tags, but then the predefined options are all the available filters and after selecting a filter you can enter the desired value. For instance, you enter "user:" after which you can select one of your users. This will then result in "user:John" in your search bar (and underneath it keeps track of the user id for the actual search). Next you can add another filter etc. resulting in powerfull search queries while using just one search box.
Also see this Kibana search example:
I am just wondering what already exists, before I start making this.
Please be patient with my English, and it's my first time to be here. I am very new to Tableau and JavaScript as well. I am trying to find a way to filter the dashboards in a different place. For example, when I click a person name from a list on the first dashboard and it shows a result, once I click another dashboard from the drop-down (not on API, just come from an HTML nav bar), this dashboard should show any results with the person name I chose on the first dashboard.
Like this: I'm viewing Dashboard 1. I apply filter Anthony. Then I go to Dashboard 2 after clicking this on drop-down. IF Dashboard 2 also has a filter named exactly "Anthony" show the result automatically.
I tried to research about this, but it does not help very much. I read the API reference and I thought getFilterAsync() from FilterEvent Class would work, but it doesn't. I would appreciate if you can explain or show an example with Javascript codes constructively. This example is similar to my goal, but I don't plan to use two dashboards and textbox/button on the same page. Another example is sort of what I want, but I don't need to put specific values on method to filter. I need to filter across workbooks after clicking anything on the API. It's not just a person name. It can be a date, number, location, etc. I want to know how I make filter values/parameters active on any dashboards.
Any response will be helpful. Thank you!
use action filter, where you specify the source dashboard and then the target dashboard
I've got a problem with my filters.
My Website is: https://webiloot.com/
Currently, when going in a collection you can pick one filter from each group.
My problem is that the filter system is showing products containing for example: Thor AND Batman. Instead, I need it to show products containing Thor OR Batman.
I understand how the filter system works, it creates a new URL joining each filter with '+' sign.
I don't need help writing code (therefore, I'm not pasting any).
My question is what should the URL look like to acheive my goal?
Thanks a lot!
You cannot currently create a URL ORing tags. See https://ecommerce.shopify.com/c/ecommerce-design/t/filtering-a-collection-using-multiple-tags-and-vs-or-324651
I've done it in the past with AJAX calls
Currently I am using Jquery Chosen Plugin in order to search the values written inside a search box and it works very well in case I want to search on the basis of the text written inside the option tag. i.e. as shown in the figure:
But what I want to achieve is search on the multiple basis i.e. on the basis of the text written inside the option tag as well as the data attributes of the option tag i.e.
For example in the above figure I may be able to search Debitors either by typing Debitors directly or by typing the data-phone's value i.e.0321-111111. I've searched the chosen plugin's documentation for the possibility to search on the basis of multiple values but, as much as I know, there wasn't any functionality provided by it.
Now what I'd like to ask is, Is there any jQuery plugin providing this multisearch functionality that you may know of?
Thanks.
Finally, I found Select2 Jquery plugin that allows the custom matcher for the searching. i.e. You can define whatever you want plugin's search to search.
i was wondering if there is a frame work or some sample code to create dynamic filters for search result to allow users build results.
i want to show user the filter they have choosen and have a small x button for them to remove the filter
like the one this site
http://www.soap.com/buy/Type=Acne+Treatments%7CBar+Soaps?s=Olay
Since you tagged this question with JavaScript, HTML and AJAX, take a look at the ajax-solr project. The Reuters demo site for ajax-solr implements this type of search filter behavior and they also walk you through how to build this with Step 5 of their tutorial.
You should look into Solr facet queries. This page should help get you started: http://searchhub.org/2009/09/02/faceted-search-with-solr/