Post by CJC » Sat May 14, 2022 5:02 am

Hi All,

I moved the Search bar from the header to the top nav. When I type a phrase in the field and hit return on the keyboard nothing happens. If I click the magnifying glass the page redirects to a search results page with 0 results. Here's what I did:

Code: Select all

<nav id="top">
  <div class="container"> 
    <div id="search" class="input-group pull-left hidden-xs hidden-sm">
  <input type="text" name="search" value="" placeholder="Search" class="form-control input-lg" />
  <span class="input-group-btn">
    <button type="button" class="btn btn-default btn-lg"><i class="fa fa-search"></i></button>
  </span>
</div>
The rest of the top nav is the default code.
Any ideas why this wouldn't work here?

OC 3.0.3.6, default theme
Last edited by CJC on Mon May 16, 2022 10:46 pm, edited 2 times in total.

CJC
Active Member

Posts

Joined
Wed Jun 03, 2020 5:51 am

Post by by mona » Sat May 14, 2022 5:45 am

CJC wrote:
Sat May 14, 2022 5:02 am
Any ideas why this wouldn't work here?
OC 3.0.3.6, default theme
To answer your question - Yes
If that is all you have done you have not edited the javascript (commons.js) - it has a selector of header not nav

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by CJC » Mon May 16, 2022 9:18 pm

Thank you Mona. I didn't think that the code for the form would have a specific selector for it. I'll make the necessary modification.
by mona wrote:
Sat May 14, 2022 5:45 am
CJC wrote:
Sat May 14, 2022 5:02 am
Any ideas why this wouldn't work here?
OC 3.0.3.6, default theme
To answer your question - Yes
If that is all you have done you have not edited the javascript (commons.js) - it has a selector of header not nav

CJC
Active Member

Posts

Joined
Wed Jun 03, 2020 5:51 am
Who is online

Users browsing this forum: jagall, moreduff and 264 guests