Search code examples
dhtmlx

Get any element


I am using DHTMLX, and I have output that goes to a div. The text gets into the div using "attachHTMLString", but after it's in that div, I don't know how to access it.

I'm used to using jQuery where you can assign an ID or class and traverse the DOM and get it. With DHTMLX, it's like jQuery's powers are useless. I just cannot get the data that is right in front of me.

I'm looking for something like:

var divText = dhtmlxElement.getText();

What's the secret to traversing the DHTMLX elements?


Solution

  • I just figured out, the way to do it is to give the element an ID when it's created. Later, you can just call it out by ID.

    What apparently does NOT work is to refer to the element on the page by its DHTMLX name and try to "get" it, or capture its text.