Skip to main content
Participant
October 18, 2023
Answered

I'm not getting the DOM values InDesign Version 18.

  • October 18, 2023
  • 3 replies
  • 316 views

We have created the customized epub export by using Indesign script and working fine in InDesign version 17.

 

However,  I'm not getting the DOM values for HTML Body count (Example: fileBodys.length()) in indesign version 18. Also i have copy pasted the sample code for your reference.

----------------------------------------------

fileBodys = ahtml.dom.body.elements();
alert ("fileBodys.length()" + fileBodys.length())
if (fileBodys.length() != 0)
{
for (var bcount = 0; bcount < fileBodys.length(); bcount++)
{
if (fileBodys[bcount].localName() == "body")
{
if (fileBodys[bcount]. @ id != "remove")
{
var NewHtml = new XML("<html><html>");
NewHtml.appendChild(ahtml.dom.head.copy());
NewHtml.appendChild(fileBodys[bcount].copy());
var NewFile = null;
if (ahtml.file.name.startsWith("p"))

---------------------------------------------

This topic has been closed for replies.
Correct answer Abdul33001878u75q

Hi All,

Thanks for your support.

After restarting the system. Now DOM concept working fine.

Regards,

Abdul

 

 

3 replies

Abdul33001878u75qAuthorCorrect answer
Participant
October 25, 2023

Hi All,

Thanks for your support.

After restarting the system. Now DOM concept working fine.

Regards,

Abdul

 

 

Community Expert
October 21, 2023

Hi @Abdul33001878u75q,

Either share the diff as @Dirk Becker mentioned or create a sample XML and sample code to demostrate the issue so that we can have a look at it.

-Manan

-Manan
Community Expert
October 18, 2023

Dunno - if it's related or not - but see if changing this helps???

alert("fileBodys.length: " + fileBodys.length);
Legend
October 18, 2023

Assuming ahtml is instance of XML, length would be a method.

Best would be if Abdul provided a screenshot with a diff of the relevant sections, old + new version of the particular epub.