Re: document.getElementById("main").innerHTML not working
Jason Orendorff <[email protected]> Mon, 17 Aug 2020 13:05:32 -0500
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <CA+W3DWH3TOX5v7bG=u29GszpODi50H==rL0NQ8NckVK3vkwztA@mail.gmail.com> |
Hi Tony, This isn't the right forum for this question. Likely main.html and test.html end up in two different documents, and `document` refers to main.html. But I would try asking in the Eel Discord. -j On Mon, Aug 10, 2020 at 11:55 AM Tony Tech <[email protected]> wrote: > I have main.html, test.html and script.js in the same folder. I'm using a > Python package called Eel, and that's how I'm interacting with html and > Javascript. When I call function dummy() as shown below, I get a print > statement from Python, which is exactly what I want, but when I change the > "main" to "test" in the dummy() it doesn't print anything. Why is that? > How come script.js knows about "main", but not about "test"? > > main.html > <div> > <p id="main">This is from main.html</p> > <input type="submit" name="" onclick="dummy()"></input> > <div> > > test.html > <p id="test">This is p tag in test.html</p> > > script.js > function dummy() { > u = document.getElementById("main").innerHTML > eel.dummy(u) > } > _______________________________________________ > dev-tech-js-engine mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-js-engine >