Currently I have two HTML files. One named index.html and another called editor.html
Inside index.html I have an iframe of editor.html Above this iframe is also a notification system I made. To run a notification it uses a function I created which can be used like so:
Notification("msg");
This function works great when I call it from inside of the index.html since the function modifies the index.html's html code (via .innerHTML). An issue shows up when I try and call it from the editor.html
Even with the editor.html added into index.html like this at the top of index.html:
<script src="editor.html"></script>
And I wrote this in the editor.html:
<script src="index.html"></script>
When I try and run the Notification function from the editor.html there is an error since the function is inside the index.html and modifies index.html, not editor.html.
Keep in mind that in each of the index.html and editor.html the javascript is in a tag because there is other html within the file. Thanks and please ask questions if you need further confirmation.