I would like to know what are the alternatives to replace an iframe.
I have this code:
<iframe src="noticia.html" width="550" height="400"
scrolling="auto" style="position: absolute; left: 2%; top: 38%;">
</iframe>
I would like to know what are the alternatives to replace an iframe.
I have this code:
<iframe src="noticia.html" width="550" height="400"
scrolling="auto" style="position: absolute; left: 2%; top: 38%;">
</iframe>
Option 1
<embed src="noticia.html" width=100 height=100 />
It works, but according to W3C it's for interactive content or media
Option 2 Through the XMLHttpRequest and post the content into a div.
function loadPage(){
if (window.XMLHttpRequest){
// IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}else{
//IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function(){
if (xmlhttp.readyState==4 && xmlhttp.status==200){
document.getElementById("ID_do_elemento").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("POST","WEBPAGE YOU WANT TO LOAD",true);
xmlhttp.send();
}
You can use the Jquery Load function to include an html file inside your page! link