var stories = app.documents.stories.everyItem().getElements();
var containers = stories[i].textContainers;
alert("text box is empty");
thanks it worked here as well. if you could also explain why "0" is present in this statements => containers.select();
just want to understand.
I need one help from you so let me give an overview of what I am looking for and request you to give a solution if possible
I have an InDesign Template file which is used for a magazine (automated), ie the data for the magazine would come from other source and we are importing the data as XML to the template and start edits on the imported InDesign file.
Now the real issue is, since we are suing XML, we have kept a page mapping in the XML as an attribute, ie copy the page number which is available in the InDesign page right bottom and paste the same in XML page number attribute. Since this is a manual process whenever there is a change in XML Template (add a new page or remove a page) we had to manually change the page number attribute which is tedious work, instead it would be really great if we can read the page number from the InDesign Template itself and somehow automatically generate the XML page number attribute.
I hope you understand the issue. Please let me know if you have any solution in your mind
Thanks in advance