Any way to do DOM manipulation with JS on an HTML snippet?
I want to use JavaScript to set event listeners on some elements produced in by HTML snippet written in Deluge. I tried creating a nodeJs function and calling it at the end of the HTML snippet, but when the code runs, I get an error saying the document is undefined. Thinking that perhaps the issue was just that the JavaScript was trying to access the DOM before it was fully rendered, I tried throwing a setTimeout in there to make sure the DOM got a chance to load. That prevented the "document is undefined" error, but the code still doesn't work. I also tried throwing the code in a widget, but the widget is not allowed access to the DOM outside the Iframe where it lives.
When I copy and paste my code into the console, it has the exact expected behavior. I just need to integrate this into the actual page. Any ideas?
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.