attachList

adds a list-like structure to the popup

void attachList(string template,array data);

Parameters

templatestringcomma-separated list of data properties that will be rendered in the list
dataarraydata available for rendering in the list

Example

var myPop = new dhtmlXPopup(...);
myPop.attachList(
    "name,price",   // template
    [               // data
        {id: 1, name: "Audi A5 Coupe", price: "€ 31,550"},
        {id: 2, name: "Audi A5 Sportback", price: "€ 30,990"},
        myPop.separator,
        {id: 3, name: "Audi A6", price: "€ 30,990"},
        {id: 4, name: "Audi A6 Avant", price: "€ 37,450"},
        {id: 5, name: "Audi A6 Quattro", price: "€ 55,360"}
    ]
);

Back to top