Click here to Skip to main content
15,883,901 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I need a search filter in jquery which shows only the results on the page and which search all the pages of the website . Please help

Posted
Updated 27-Jun-15 19:51pm
v2
Comments
Andy Lanng 23-Jun-15 5:39am    
what do you mean: "Search all the pages". Search them for what? Is your content stored elsewhere?
Memthoi 23-Jun-15 5:46am    
There are like 10 web pages of the website, its a fashion website which includes bags,clothes products so what i want is , when a user searches for a particular product on any of the web pages where a search filter is there, i want the results to come on the page. Thanks.
Andy Lanng 23-Jun-15 6:05am    
How are these items loaded on the pages? Are they stored in a db and loaded via some id?
Basically, don't try to search pages; search for products instead.
Memthoi 23-Jun-15 6:28am    
Thanks for the reply. The items are in the same server where the pages reside. and yes they are loaded via some id as lists. Search filter that searches products on a page is there but i cant find any that searches products in multiple pages at the same time.
Andy Lanng 23-Jun-15 6:57am    
Ok, you need to forget about what page they are on. That should not effect the search.
So when a page loads, it populates the product [table?] on that page. What you need to do is search the products themselves.

Tell you what: Click "Improve Question" below your original question and add the code that loads a product onto a page. I can then suggest how you can use this information to search AND display the products on a search results page

1 solution

You need to use a backend technology to perform server side searches.

SQL is really good for searches. It means "Structured Query Language" where the query is your search parameters.[^]

With or without a database, you will need some back end language. Performing the search in jQuery is a really bad idea. All of the products will have to be loaded at client side for every search.

PHP is good for small sites where security isn't an issue[^] and it can be run on any platform (win, unix, etc). I prefer ASP.NET written in c# but it can also be written in VB. This can only be run on a windows server (atm).

To use .NET (ASP, VB, C#), you will need Visual Studio. You can get Visual Studio Community for free.[^]


You will need to brush up on these technologies. There is a steep learning curve but getting a basic website up and running is actually pretty easy. You will be able to turn your html website into a Visual Studio project without converting anything. You can choose to convert your entire website to a web application (making backend dev easier) at any time or not at all.
More on opening and converting website in Visual Studio here[^]

Post a new question or let me know if you need help setting up. Once you have the setup, post a new question to ask how you can write searches in your chosen language
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900