jQWidgets Forums

jQuery UI Widgets Forums General Discussions Auto Complete – Input

This topic contains 2 replies, has 2 voices, and was last updated by  Peter Stoev 12 years, 2 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Auto Complete – Input #16362

    Sunnyland
    Member

    Can I use the autocomplete to populate other textboxes when the correct value is selected. For example I would like to add the surname to a textbox once the first name is selected, or add the address to the fields when the company is selected.

    Auto Complete – Input #16363

    Sunnyland
    Member

    Ok I figured out a way to do this using

    $(‘#ClientName’).bind(‘change’, function(event) {
    var value = $(“#ClientName”).val();
    });

    the only problem is I get a double hit on this. First I get the typed string ie ‘Sun’ then I get the company name ‘Sunnyland’ is there a condition I can add to only send the values to the server once the complete value is selected.

    Auto Complete – Input #16369

    Peter Stoev
    Keymaster

    Hi Sunnyland,

    The “change” event is raised when the input’s focus is lost and if the Input’s value is changed while the Input is on focus. It is an event available for all HTML Inputs: http://api.jquery.com/change.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.