search box opens Facebook instead of searching (3 posts)

  1. Carma
    Posted 3 years ago #

    The search box on my blog works fine in IE. But in Chrome and Firefox, when I click in the search box, it makes a new Facebook window pop open. There is no way to use the search box at all. I have deleted and reinstalled it but it continues to open Facebook!

    My website is winging-it.me

  2. michael.mariart
    Posted 3 years ago #

    This is happening because Chrome and FireFox are behaving as they are meant to from your HTML code. IE is the "od one out" becuase it's not following standards.

    The code for your search form is:

    <form id="searchform" class="searchform" method="get" action="http://winging-it.me"><a target="_blank" href="https://www.facebook.com/homeschool.the.revolution">
        <p class="clearfix default_searchform">
            <input type="text" name="s" onblur="if (this.value == '') {this.value = 'Search';}" onfocus="if (this.value == 'Search') {this.value = '';}" value="Search">
            <button type="submit"><span>Search</span></button>

    I'm not sure how obvious it is, so I'll point it out. You have a link wrapping your entire search area - <a target="_blank" href="https://www.facebook.com/homeschool.the.revolution">. Because it's a link, when someone clicks on it (anywhere inside that search area) they will go to that link.

    Without knowing your system I'd say that this is written into the theme, and is most likely in a file called search-form.php. If you can edit that file you will be able to remove the link tag. Jut be sure to remove the closing </a> tag as well.

  3. Carma
    Posted 3 years ago #

    THANK YOU! This wasn't exactly the problem but you put me on the right track! I checked my search-form.php (and everything to do with search) and they all looked correct, without the link to the Facebook page. Finally I looked in the widget above the search box widget, the one that was actually supposed to have the link to my Facebook page ... and there it was, after all my correct coding: an extra link to the Facebook page without a closing tag!

Topic Closed

This topic has been closed to new replies.

About this Topic