Hi,
I am trying to include another HTML file in a HTML file using JavaScript.
I have tried many solutions given on the web and have not found one that works. I am a beginner with HTML and JavaScript, so I need all the details.
Thank for any help
Alan
This one should work: http://www.dynamicdrive.com/dynamicindex17/ajaxincludes.htm --at least if you test it from a web server. None of my newer browsers allow this script on HTML files that I open directly from my local file system. For security reasons, the included file must be hosted by the same domain as the page displaying it ("Same Origin Policy"), but browsers don't understand that the local file system is the same "domain" for both the parent page and the inclusion file. If you check the browser's javascript console there may be an error message about this.
Thank you for your replay.
I am trying to open the HTML file from my local file system.
Thank you for the explanation why that will not work.
Alan
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)