Can someone please explain me how to load external html (e.g. test.html) into index.html? test.html contains links, div, css and its own javascript code. I tried this http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm but it doesnt work. I can load external html file but it loads only css, links and div, not javascripot code which is attached to that file
why exactly is iframe not good enough? You might want to describe what you want to do so we can help you. Just showing one HTML page within another is exactly what an iframe does.
IFrame is probably the only option or the CSS from all the different pages will change the appearance of the original page.. most likely. Otherwise you could use server-side includes.
Have you tried using a Js framework, with Jquery you could simply do: $('#thisdiv').load('text.html'); For javascript, you should keep that in a separate script file (it's a good practice), again with JQuery you can load that dinamically using $.getScript('myscript.js')