jQWidgets Forums

This topic contains 5 replies, has 4 voices, and was last updated by  Peter Stoev 12 years, 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author

  • kingaru
    Participant

    Hello,

    According to API documentation “select” event in jqxInput should be working when an item is selected from the auto-suggest popup. So if typed something which is not in the auto-suggest list this even should not be triggered, right? Unfortunately is I do that and then select it by mouse (clicking twice) it still treating the even like something that was selected from the auto-suggest list. Could you please advice on this behaviour? Basically I need to create a function do not accept in the input anything which is not in the “auto-suggest” list.

    Thanks in advance
    Igor


    Peter Stoev
    Keymaster

    Hi Igor,

    We confirm that behavior. The issue is that there is a default ‘select’ event which occurs when an Input tag is selected. As a workaround, you may bind to ‘focus’ and ‘blur’ events of the Input tag and update a boolean flag in the event handlers (isFocused = true) on focus and (isFocused = false) on blur. In the ‘select’ event handler, if isFocused == false, then the selection is done through the ‘mouse’.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    vijaybabu
    Participant

    Hi Peter

    How to set ” isFocused = false” for jqx input . Please give me sample code for this.

    Regards
    Vijay babu.K


    Peter Stoev
    Keymaster

    Hi,

    isFocused is a custom boolean tag which I suggested in this post. You can set it by writing: isFocused = false or isFocused = true; To define such flag, write var isFocused;

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    zenmiami
    Member

    this actually works great, but how to do assign to other jqxInputs parts of the object selected? My json returns formatted city+state, state, country. I can set the value of my jqxInput using the dataadapter using the code above via mouse select or keyboard, but how do I save the other elements from the object selected ?

    Thanks
    Robert


    Peter Stoev
    Keymaster

    Hi,

    jqxInput can display in the Popup only a field associated to the displayMember. Each item can have a “value”, too which is specified by the valueMember property. If you display additional things, then you can get the input’s displayed text using $(“#input”).val();

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.