onchange AND onblur AND onkeypress

Discussion in 'Javascript' started by Mark, Aug 22, 2007.

  1. Mark

    Mark Guest

    Sorry for the double post, but I got no responses from the first
    group...

    I have a sample page. See link.

    http://comptrex.com/star/startest.htm

    It has a select box that contains a list of countries. It also has a
    div that contains the same list of countries, with a checkbox next to
    them. The user can check the checkbox next to the country, then
    submit to some processing page. However, if this list gets too long,
    they won't want to scroll throught the entire list, so I made the
    select box above. The user can find the country they want in the
    select box, and the onchange event will check the country in the list
    below.

    So far everything is good.

    Now, If the list is really long, the user will need to scroll through
    the list box to find the country, so I added code that will allow the
    user to type in part of the name, and it will find them in the list
    box. This works well.

    The problem is, I can't get the two functions to work together. If
    the user searches for a country by typing in the select box, clicking
    on the country, or the return, selects the country in the list box,
    but won't fire the onchange event. I had to add a link to select it.
    I don't want to do this.

    Long story short, can anyone figure out how to get the onchange event
    to fire after a user has entered in some characters to search for?

    I appreciate any help.

    - Mark
     
    Mark, Aug 22, 2007
    #1
    1. Advertisements

  2. Thomas 'PointedEars' Lahn, Aug 22, 2007
    #2
    1. Advertisements

  3. Mark

    Mark Guest

    Thanks for the reply.

    I'll give it a go.

    - Mark
     
    Mark, Aug 22, 2007
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.