logo

New Response

« Return to the main article

You are replying to:

  1. Jake, Love your site! Wonderful job and the articles are simply brilliant.

    I have been struggling with a searchbox similar to yours today (unknowingly of your example which just proves it again: before you start - check out Jakes site to avoid reinventing the wheel...). But I actually want to ALLOW my users to submit the query with Enter which I feel is more userfriendly. But it's close to impossible, or maybe I'm overlooking something basic!

    I try to catch the onSubmit event and instead of return false, I call my searchfunction in Javascript. But, the URL in my browsers addressfields wont change to the computed Javascript string. It just takes whatever is in the location.href and adds my querystring !! If I put the exact same function on a button it works. Argh!

    I tried several different ways to get around this but the result is always the same. If you (or someone else) have a working example of this in action, I would be more than happy.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: