Méthode qui doit pas etre super valide w3c mais qui fonctionne, l'objet xmlhttp.
Pour le html :
1 2 3 4
|
//ta page...
<div id="mondivframe"></div>
//le reste... |
Et du coté javascript un truc du style :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
function NewXmlHttp()
{
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
function showLink(url)
{
website=NewAjax();
website.open("GET", url);
website.onreadystatechange = function() {
if (website.readyState == 4 && website.status == 200) {
document.getElementById("mondivframe").innerHTML=website.responseText;}
}
website.send(null);
}
} |
Sur tes liens, un appel du style :
showLink("http://www.monsite.com")
sans oublier le http 
bonne merde
Partager