I'm currently working on a webpage that includes ASP.NET panels and JavaScript which retrieves all components present on the page:
var items = Sys.Application.getComponents();
My goal is to obtain the name/ID of each element stored in the 'items' variable. I attempted the following code snippet, but unfortunately, it doesn't yield the desired result:
for (var item in items)
{
alert(item.name);
}
I am trying to figure out which attribute of 'item' holds the name/ID information. How should I adjust the provided code to successfully achieve this?