The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Image "alt" search imput with filter, How to get images filter with a load more option
Dohm
post Feb 8 2021, 03:23 PM
Post #1





Group: Members
Posts: 6
Joined: 3-June 20
Member No.: 27,374



Hi all,
just looking to see if anyone would have guidance for an image search box that would search for the alt text of that image and filter others out... plus to have a load more to have only 12 image at a time.

I've been looking online for something of this sort but with no luck.

I have thousands of images, sets of 12, 4x4 with each a different name so... Test 01, Test 02... I would need help in having a search box with filter that would sort through all the images and only bring up the one written in search box.

I already have this code for the text I.E.
CODE
<ul id="myUL">
with a list that filters the text desired. Could this be done with images also. And the load more button to only have 12 at a time... I am not looking for button sort but text search from these images.

If you know of an example online please let me know.

Cheers

Dohm

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 8 2021, 05:03 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,628
Joined: 10-August 06
Member No.: 7



With thousands of images, maybe the best solution would be a database (or just a text file), where each image file's URL and intended ALT text is listed on its own row.

When the user submits the search form, it would make a server-side script (like PHP) create a list of all matches, and print a web page with IMG elements for the first 12 matches. The form could contain a hidden field (with a value starting on say "1"), indicating which set of 12 images it has returned.

To load more images, the result web page could contain the same form as before, with the hidden field value count incremented.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 8 2021, 05:06 PM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



What are you going to have in the UL? Surely not thousands of alt texts?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Dohm
post Feb 8 2021, 05:54 PM
Post #4





Group: Members
Posts: 6
Joined: 3-June 20
Member No.: 27,374



QUOTE
What are you going to have in the UL? Surely not thousands of alt texts?


I use right now excel and Notepad++ and yes I copy and paste the addon text...so when I add more text to my UL I have a quick workaround.

This post has been edited by Dohm: Feb 8 2021, 05:55 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th March 2024 - 09:20 PM