• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Help with a search function

Community Beginner ,
Sep 04, 2021 Sep 04, 2021

Copy link to clipboard

Copied

Hey guys, I was wondering if someone could help talk me out of a slight problem that I'm having with Dreamweaver 2021. Basically, I'm in the process of building my own business website and I'm about halfway through but I'm having a little trouble with a search function on my store page. See, I've got the form objects with the search components functioning correctly however off to the side of that is the section where the main content gets displayed and so what I am trying to achieve is to have the search function button use the keyword text from the search field to do a filename search in the website image directory and have the results displayed in the main content section. If you can help with that, I'd be really happy. Thanks guys.

Views

157

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 04, 2021 Sep 04, 2021

Copy link to clipboard

Copied

This is how I would do it 

https://youtu.be/dvHWxir1yTY

 

Wappler, the only real Dreamweaver alternative.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 05, 2021 Sep 05, 2021

Copy link to clipboard

Copied

Without a database being involved you should build an array of image objects in javascript or build an array of image objects in a json file, then search through the array of objects and return any image which contains the search phrase returned from the form field.

 

Not sure why you'd just want to return an image or images though, if its a store. Normally you'd want to return an image plus some details, unless its just an image gallery you require.

 

Let me know and I can provide you with some example code if you need to progress this.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 05, 2021 Sep 05, 2021

Copy link to clipboard

Copied

LATEST

Before we get totally ahead of ourselves, you're selling images?  How many images are you selling? 

 

How likely is it that people will search for the exact filename of an image?  Isn't it more likely that they will use generic keywords and phrases to search records in a database to find what they're looking for?  

 

I think we need to know more about what you're doing before we can provide you with meaningful solutions.

 

In the meantime, Google's Custom Search engine can be programmed to show search results on the same page via an <iframe>.   But the search results are actually coming from Google's SERP.

https://programmablesearchengine.google.com/about/

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines