I am having problems with element placement on document
var myDocument = app.activeDocument;
var productXML = new XML (xmlString);
alert(productXML.children().length());
x1=0;
y1=0;
x2=25;
y2=25;
for(myCounter = 0; myCounter < productXML.children().length(); myCounter++){
alert(productXML.product[myCounter].name);
element = myDocument.pages.item(0).textFrames.add();
element.geometricBounds = [x1,y1,x2,y2];
y1 = y1+25;
element.contents = productXML.product[myCounter].name;
}
In above code, i get error with
y1 = y1+25; and element.contents = productXML.product[myCounter].name;
the product name comes correct when i display it in alert but i can not assign it to contents. and changing x-y positions also throwing an error.