Forum Moderators: open
window.onload = test
function test() {
document.getElementById('video').innerHTML = "<!--#include virtual=\"includes/video.htm\" -->";
}
However, when I view the contents of my 'video' div nothing appears. When I delete the '<!--' I can see the contents in the div. However, I don't want to do this becasue then my include will not appear.
Does anybody know how to do this?
Thanks
When you use an SSI you are asking the server to parse the file for SSI directives that can include static files, script output, or execue basic system commands prior to delivering the document to the client. When you do it with Javascript, the document has already been delivered, it doesn't re-query the server again.
If the include needs to be activated by user interaction with the page, you may consider Ajax or sending a request back to the server in some other way to refresh the page.