.children returns empty objects

I have a container box, $w(‘#menuBox’), with 3 buttons attached.

When I use
buttons = $w(‘#menuBox’).children;
I get an array of 3 empty objects. If I attach a 4th button, I get an array of 4 empty objects. This does not seem to be operating the way the API says it should.

Thoughts anyone?

Kevin Lewis

In preview I get a simple array:

On the published page, there is an array of objects:

Thanks Anthony, that’s exactly what I expected to see - but while I get the objects, the label and Id fields are blank.

What is the URL? Where and how can we see the problem?

Hi Yisrael,

Embarrassing to say, but I didn’t look close enough. I’ve just realised the objects were not blank, I just needed to click the ‘…’ to expand the object elements. Site is now working as expected.

Thanks for replying,
Kevin