c-n Posted May 22, 2006 Share Posted May 22, 2006 I am making a page using xhtml and javascript. Trying to make strict xhtml frames are not allowed, but I still need to include different external html files from the menu.According to the standard here on w3 <object> should do the job, and it does... in some browsers. IE does not show the external html file. FF includes the html file, but when changing the data="" attribute using javascript, the <object> is not updated. // Generate the menu arrayvar menu = new Array();var i = 0; // menu[i++] = new menuobject("Home","home.html");menu[i++] = new menuobject("Simulation","sim.html");menu[i++] = new menuobject("Files","files.html");menu[i++] = new menuobject("Pictures","pics.html");i = 0; // Change external used html filefunction setmain(i){ var obj = document.getElementById("objid") obj.data="files/" + menu[i].filename;}<!-- object for including external html file --><object data="files/home.html" type="text/html" id="objid"></object><!-- Menu item --><a href="#" onclick="setmain(3)">Change page</a> Thanks in advanceClaus Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now