getItemData
returns items of the list attached through the attachList method
array getItemData( [string|number id] );
id | string|number | optional, item id, if not specified data for all items will be returned |
Example
var myPop = new dhtmlXPopup(...);
myPop.attachList("name,price", [
{id: 1, name: "Audi A5 Coupe", price: "31550"},
{id: 2, name: "Audi A5 Sportback", price: "30990"}
]);
var data = myPop.getItemData(1);
/*
result:
data = [{id: 1, name: "Audi A5 Coupe", price: "31550"}]
*/
var data = myPop.getItemData();
/*
result:
data = [
{id: 1, name: "Audi A5 Coupe", price: "31550"},
{id: 2, name: "Audi A5 Sportback", price: "30990"}
]
*/
Back to top