WordPress.org

Ready to get started?Download WordPress

Forums

Can't get Livesearch working. (14 posts)

  1. notRyan
    Member
    Posted 9 years ago #

    I've been working on getting Livesearch (http://binarybonsai.com/archives/2004/09/25/livesearch/) working, but I can't.
    I've followed all the directions, I have my livesearch.js, I have CSS, I have a livesearch.php, I've modifyed the header, I've added the body tag and this is my searchform

  2. <form style="margin: 10px 0; padding: 0;" onsubmit="return liveSearchSubmit()" id="searchform" name="searchform" method="get" action="livesearch.php" autocomplete="off">
    <input type="text" id="livesearch" name="s" value="" onkeypress="liveSearchStart()" onblur="setTimeout('closeResults()',2000); if (this.value == '') {this.value = '';}" onfocus="if (this.value == 'search blog archives') {this.value = '';}" class="inputboxes" />
    <div id="LSResult" style="display: none;"><div id="LSShadow"></div></div>
    </form>

  3. If anyone here has successfully installed Livesearch on their WP blog, can they tell me what I'm doing wrong? My site is http://rv2.org.
    Thanks,
    Ryan

  • Dark
    Member
    Posted 9 years ago #

    take care of ur livesearch.js. change "q" to "s".

  • notRyan
    Member
    Posted 9 years ago #

    Yup, I done that, but still it doesn't work.

  • Dark
    Member
    Posted 9 years ago #

    you've done? but i found this in ur .js file:
    if (liveSearchLast != document.forms.searchform.q.value) {
    if (liveSearchReq && liveSearchReq.readyState < 4) {
    liveSearchReq.abort();
    }

  • notRyan
    Member
    Posted 9 years ago #

    Oh thanks! I thought we just had to do a little section. I did it but still, it isn't working.

  • dss
    Member
    Posted 9 years ago #

    I wrote up a tutorial for adding livesearch to WordPress 1.5.1 here

  • Cypher
    Member
    Posted 9 years ago #

    @dss: Your livesearch implementation doesn't work on my Firefox 1.0.4. It does work on IE 6. The links that show up have a hover color of white which makes them disappear against the background, might want to change that.

    Regards

  • Jinsan
    Member
    Posted 9 years ago #

    yep can confirm Cypher's response. Not sure about IE, too lazy to try with that but it isn't working work with FF.

    Now I did it another way...it works in both IE and FF but it's....a little messy :) The keyboard navigation works, but in reverse (you have to press down and then go backwards!) and I need to make the CSS more palatable.

  • dss
    Member
    Posted 9 years ago #

    couple things:

    1. IE

    LiveSearch simply doesn't work in IE.

    I have not found a resource where it's been made to function in IE. When i do, i'll update.

    2. Firefox.

    <strike>It does work. I thought the same thing (see issues at the bottom of the entry.)
    a cache clearing and a couple reloads and it works just fine.</strike>

    You're right.

    It doesn't work in Firefox either.

    Bummer...

    Back to the drawing board, I've definitely missed something...

    F.

  • Jinsan
    Member
    Posted 9 years ago #

    just to add Livesearch does work in IE6

  • dss
    Member
    Posted 9 years ago #

    Right, I always forget that.

    As a mac head, we got IE 5.2 and that was that...

  • Jinsan
    Member
    Posted 9 years ago #

    well I don't think you'll be missing IE :)

  • scarty
    Member
    Posted 8 years ago #

    i already have a livesearch on my plugins my concern is i want to put a value on the text box whis is "search blogs archive" i want it inside the box.

    do you have any idea on which part of the file im going to edit it?

    im already using beta 2 it has a little error but i think its fine coz it still searching for what im looking for. my concern is on my second paragraph.

  • scarty
    Member
    Posted 8 years ago #

    huh? nobody wants to help me? :(

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags