jQWidgets Forums

jQuery UI Widgets Forums Lists ComboBox Check if jqxComboBox exists

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Check if jqxComboBox exists #68778

    morgenweck
    Participant

    What do I need to do in code to check if the jqxCombobox exists? I know it sounds strange but I am building the box’s on the fly and then I need to go back and read the values. Sometimes I need to destroy the box and if I try to read it – as you can imagine it throws an error. If I built by item = $(“#” + loc).jqxComboBox(‘getSelectedItem’); and loc is a variable if there is no box at that position then it throws an error. This might be a pure JavaScript question but I figured I would start here.

    Thanks

    Check if jqxComboBox exists #68782

    Peter Stoev
    Keymaster

    Hi morgenweck,

    In jQuery, to check whether HTML Element exists, do this $(“#” + loc).length > 0

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.