JavaScript: Access element in iframe - Raspberry Pi Forums
been goggling , getting bit lost.
have main page iframes in it. want able @ element in html page referenced 1 of iframes. can't iframe object @ it's document.
javascript in external file, issue?
c/c++ coder getting lost in javascript land.
chrome dev tools saying iframe var null.
html main page.
have main page iframes in it. want able @ element in html page referenced 1 of iframes. can't iframe object @ it's document.
javascript in external file, issue?
c/c++ coder getting lost in javascript land.
chrome dev tools saying iframe var null.
code: select all
function ideoutput(newtext) { var iframe = this.document.getelementbyid('ide-output'); var innerdoc = iframe.contentdocument || iframe.contentwindow.document; var tb = innerdoc.getelementbyid('output'); tb.innerhtml += newtext + "\n"; } code: select all
<!doctype html> <html lang="en"> <head> <title>ide</title> <meta charset="utf-8" /> <link rel="stylesheet" href="/default-style.css"/> </head> <body style="background-color: #82a2ff;"> <div class="ide"> <table class="maxsize"> <tr > <td class="ide-toolbar"><iframe src="ide-toolbar.html" class="ide" seamless="seamless"></iframe></td> </tr> <tr> <td> <table class="maxsize" > <tr> <td class="ide-workspace"><iframe src="ide-workspace.html" class="ide" seamless="seamless"></iframe></td> <td class="ide-editor"><iframe src="ide-editor.html" class="ide" seamless="seamless"></iframe></td> </tr> </table> </td> </tr> <tr> <td class="ide-output"><iframe src="ide-output.html" class="ide" id="ide-output" seamless="seamless"></iframe></td> </tr> </table> </div> <script type="text/javascript" src="/toolbar.js" ></script> </body> </html>
"my javascript in external file, issue?"
dont think ...
testing by
loading file/s in chrome from
a) /test.html
or using webserver/httpd
b) localhost:8080/test.html
?
version of chrome / os ect
in not distant past
have been "getting lost in javascript land" (browsers )
long times find im not lost expected ..
dont think ...
testing by
loading file/s in chrome from
a) /test.html
or using webserver/httpd
b) localhost:8080/test.html
?
version of chrome / os ect
in not distant past
have been "getting lost in javascript land" (browsers )
long times find im not lost expected ..
raspberrypi
Comments
Post a Comment