I have a main.html containing the following div:
document.getElementById("main").innerHTML='<object type="text/html" data="page1.html" ></object>';
document.getElementById("main") // returns null
Your issue is trying to use a single page's DOM to interact with content loaded in through an
Here's a beginner's guide to plain-JS AJAX. Frameworks like jQuery simplify the process immensely.
Otherwise, no. You cannot access that node's content because of Cross-Site Scripting security features.