Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ Image "alt" search imput with filter

Posted by: Dohm Feb 8 2021, 03:23 PM

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


Posted by: Christian J Feb 8 2021, 05:03 PM

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.

Posted by: pandy Feb 8 2021, 05:06 PM

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

Posted by: Dohm Feb 8 2021, 05:54 PM

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.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)