jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList ID selector Issue

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • ID selector Issue #65746

    raj
    Participant

    Hi,

    There is one case, where I need to build the jqxDropdown dynamically on the fly by creating the one <DIV> element and assign a id in the following format,

    <div id="cell[0].companyName"></div><div id="cell[0].branchName"></div>
    ..
    ..

    If I turn that newly created <DIV> into jqxDropdownList, then the drop down list is not getting generated.

    Suppose if I change the element id into any of the following format it is working fine,

    <div id="companyName01"></div>
    <div id="companyName_01"></div>
    <div id="companyName-01"></div>

    Can somebody help me how to escape any special characters from ID and build that into jqxDropdownList?

    Looking for a solution.

    Regards,
    Raj

    ID selector Issue #65776

    Dimitar
    Participant

    Hello Raj,

    JavaScript code cannot be set as an id in HTML. You would have to use jQuery’s methods to achieve this, e.g.:

    var dropDownList = $('<div id="' + cell[0].companyName + '"></div>');
    $('body').append(dropDownList);

    Best Regards,
    Dimitar

    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.