jQWidgets Forums

jQuery UI Widgets Forums Getting Started Listbox inside a jqxWindow

Tagged: 

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Listbox inside a jqxWindow #28473

    sergion
    Participant

    Hello,

    I have the below code and the list box will never show (though it show if I place it outside the jqxWindow control).

    var source = [
     "Affogato",
     "Americano",
     "Bicerin",
     "Breve",
     "Café Bombón",
     "Café au lait",
     "Caffé Corretto",
     "Café Crema",
     "Caffé Latte",
     "Caffé macchiato",
     "Café mélange",
     "Coffee milk",
     "Cafe mocha",
     "Cappuccino",
     "Carajillo",
     "Cortado",
     "Cuban espresso",
     "Espresso",
     "Eiskaffee",
     "The Flat White",
     "Frappuccino",
     "Galao",
     "Greek frappé coffee",
     "Iced Coffee",
     "Indian filter coffee",
     "Instant coffee",
     "Irish coffee",
     "Liqueur coffee"
     ]; 
    
     $('#jqxWindowOpenSave').jqxWindow({ 
     autoOpen: false,
     width: 250, 
     height: 500,
     position: 'center', 
     isModal :true,
     draggable: false,
     collapsed: false,
     resizable: false,
     keyboardCloseKey: 0,
     showCloseButton: true, 
     showCollapseButton: false,
     closeButtonAction: 'close',
     theme: getTheme()
     });
    
     $("#myListBox").jqxListBox({
     source: source,
     width: 200,
     height: 250,
     theme: getTheme() }); 
    
     var html = ''; 
     html = html + '<input type ="text" id="filenamebox\">'
     html = html + '<table>'
     html = html + '<tr>'
     html = html + '<td>'
     html = html + '<a href="javascript:xyz();" class="buttons">Salvar</a> '
     html = html + ' </td>'
     html = html + ' <td>'
     html = html + ' <a href="javascript:abc();" class="buttons">Abrir</a> '
     html = html + ' </td>'
     html = html + ' <td>'
     html = html + '<a href="javascript:frmLogin();" class="buttons">P</a> '
     html = html + ' </td>'
     html = html + '</tr>'
     html = html + '</table>'
     html = html + '<div id="myListBox">'
     html = html + '</div>';
    
     $("#jqxWindowOpenSave").jqxWindow('setContent', html);
     $('#jqxWindowOpenSave').jqxWindow('open');
     $("#jqxWindowOpenSave").jqxWindow('setTitle', '<strong>Abrir/Salvar</strong> ')

    TIA!

     

    Listbox inside a jqxWindow #28484

    Peter Stoev
    Keymaster

    Hi sergion,

    In the provided code, you initialize the ListBox from HTML which is not yet added anywhere in the DOM and the jQuery selection is incorrect.

    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.