jQuery UI Widgets Forums Lists ListBox jqxlistbox,not working,problem with ID

This topic contains 2 replies, has 2 voices, and was last updated by  Zabelsky 4 years, 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • jqxlistbox,not working,problem with ID #96656

    Zabelsky
    Participant

    Hello.
    I open modal

    var modalInstance = $uibModal.open({
                    animation: true,
                    templateUrl: "app/Views/Models/smsLogModel.html",
                    backdrop: 'static',
                    controller: "smsLogController",
                    size: "lg",
                    resolve: {
                        tractorId: function() { return $scope.objectToSmsLogController; }
                    }
                });
    
                modalInstance.result.then(function(data) {
                }, function() {
                });

    In controller i was created listbox:

    var listSource3 = [
                { label: 'Тип смс', value: '_StateSms', checked: true }, { label: 'Сообщение', value: 'Text', checked: true },
                { label: 'Водитель', value: '_WhoSend', checked: true }, { label: 'Экспедитор', value: 'Forwarder', checked: true },
                { label: 'Экипаж', value: '_Drivers', checked: true }, { label: 'Дата', value: '_Date', checked: true },
                { label: 'Устройство', value: '_DeviceType', checked: true }, { label: 'Пользователь', value: '_CreatedBy', checked: true },
                { label: 'Номер', value: 'TractorRegistrationNumber', checked: true }, { label: 'Тел/Имей', value: '_PhoneImei', checked: true }
            ];  
    
            $("#pow").jqxListBox({ source: listSource3, width: 50, height: 50, checkboxes: true });
    
    At from html: 
    <code><div id=&quot;pow&quot;></div></code>
    
    But when i want open the modal, i have next issue at console:
    Error: Invalid Selector - #pow! Please, check whether the used ID or CSS Class name is correct.
        at n.fn.init.a.fn.(anonymous function) [as jqxListBox] (http://localhost:1466/Scripts/jqw/jqxcore.js:7:9521)
        at Object.<anonymous> (http://localhost:1466/app/Controllers/Models/smsLogController.js:134:27)
        at Object.e [as invoke] (http://localhost:1466/Scripts/angular.min.js:39:19)
        at Q.instance (http://localhost:1466/Scripts/angular.min.js:80:122)
        at http://localhost:1466/Scripts/angular-ui/ui-bootstrap-tpls-1.2.5.min.js:13:31829
        at http://localhost:1466/Scripts/angular.min.js:120:113
        at m.$eval (http://localhost:1466/Scripts/angular.min.js:134:398)
        at m.$digest (http://localhost:1466/Scripts/angular.min.js:131:427)
        at b.$apply (http://localhost:1466/Scripts/angular.min.js:135:161)
        at HTMLButtonElement.<anonymous> (http://localhost:1466/Scripts/angular-touch.min.js:12:142)
    
    What

    s happenned ?
    thx for answer
    with best regards,Alexei

    • This topic was modified 4 years, 8 months ago by  Zabelsky.
    jqxlistbox,not working,problem with ID #96714

    Hristo
    Participant

    Hello Alexei,

    It seems this happens because you try to create this widget asynchronously or before the <div/> tag to be created in the HTML page.
    Could you provide me more details, what are you trying to achieve and what platform do you use? (“$uibModal.open”)

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    jqxlistbox,not working,problem with ID #96742

    Zabelsky
    Participant

    You were absolutely right.
    Thank you for answer
    I reorganized the code to create the widget by pressing on button.
    This problem was due to the fact that i try to create this widget asynchronously at uibModal
    P.S. I`m used angularJS
    Have a good day,Hristo.
    U r best 🙂

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

You must be logged in to reply to this topic.