jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList Issue in IE

Tagged: 

This topic contains 4 replies, has 2 voices, and was last updated by  binfch 12 years, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Issue in IE Posts
  • Issue in IE #20361

    binfch
    Participant

    Hi there

    I am using 2.6.1 (Unfortunately I cannot update to a more recent release just right now).

    I create a dropdown list and load/add dynamically items. After that I make sure that the first item is selected using:


    selectedIndex: 0

    Now at some point later I need to know the content of the selected item. So I do:


    item = $(‘#aQueryMode’).jqxDropDownList(‘getSelectedItem’).label;
    alert(item);

    This works fine in Chrome and FF. But not in IE (testing with v10). What can I do?

    Thanks & cheers,
    Peter

    Issue in IE #20364

    Peter Stoev
    Keymaster

    Hi Peter,

    Please, send us a more complete sample which demonstrates your issue. The “getSelectedItem” method is a simple method which returns the selected item and it does not really depend on the browser so according to me, there is no selected item at the point the method is called.

    Best Regards,
    Peter Stoev

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

    Issue in IE #20394

    binfch
    Participant

    Hello Peter

    Here’s an example that works fine on FF & Chrome but not in IE:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link rel="stylesheet" href="./jqx.base.css" type="text/css" />
    <script type="text/javascript" src="./jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="./jqx-all.js"></script>
    </head>
    <body>
    <script type="text/javascript">
    $(document).ready(function () {
    var listArray = [];
    listArray.push('item1');
    listArray.push('item2');
    listArray.push('item3');
    $("#jqxWidget").jqxDropDownList({
    width: 270,
    height: 25,
    autoDropDownHeight: true,
    theme: 'classic',
    source: listArray,
    autoOpen: false,
    selectedIndex: 0,
    selectionRenderer: function (htmlElement) {
    var htmlString = htmlElement[0].innerHTML;
    return '<div style="position: relative; margin-left: 3px; margin-top: 2px;">' + htmlString + '</div>';
    }
    });
    item = $('#jqxWidget').jqxDropDownList('getSelectedItem').label;
    alert(item);
    });
    </script>
    <div id='jqxWidget'></div>
    </body>
    </html>

    Thx & cheers,
    Peter

    Issue in IE #20398

    Peter Stoev
    Keymaster

    Hi,

    No problem on my side with the current version. Btw, it is better to use:

    var item = $(‘#jqxWidget’).jqxDropDownList(‘getSelectedItem’).label;

    instead of

    item = $(‘#jqxWidget’).jqxDropDownList(‘getSelectedItem’).label;

    Best Regards,
    Peter Stoev

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

    Issue in IE #20399

    binfch
    Participant

    Ooops, works indeed 🙂

    Thx & cheers,
    P.

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

You must be logged in to reply to this topic.