Bonjour,
Je sais pas si j'ai fait une erreur de conception mais me voila que depuis 3 jours bloqué sur un problème. Voici donc mon site en création où je utilise
une fonction Js pour afficher mes données vers un Div nommé Show, 
	
	<a href="" onclick="gestionClic('/Root/Fr/Txt/qui.txt'); return false;">Qui sommes nous ?</a> </li>
 
Voici la function Js
	
	| 12
 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
 36
 37
 
 |  function gestionClic(fic)
{
    pg = fic;
    http = createRequestObject();
    http.open('GET', fic, true);
    http.onreadystatechange = handleAJAXReturn;
    http.send(null);
}
 
function createRequestObject()
{
    var http;
    if (window.XMLHttpRequest)
    {
        http = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        http = new ActiveXObject("Microsoft.XMLHTTP");
    }
    return http;
}
 
function handleAJAXReturn()
{
    if (http.readyState == 4)
    {
        if (http.status == 200)
        {
            document.getElementById("Show").innerHTML = http.responseText;
        }
        else
        {
            alert('Pas de fichier');
        }
    }
} | 
 Tout marche bien voir biato.free.fr 
Question: Comment et si il est possible de utiliser history.pushState  pour pouvoir revenir en arrière via le browser ?
Ps: J'arrive à charger history mais aucun moyen de remonter dans l'historique et encore moins les afficher
	
	| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 
 | function ChangeUrl(url)
{
var page = url.substring(url.lastIndexOf("/"));
 
        if (typeof (history.pushState) != "undefined") {
            var obj = { Page: page, Url: url };
            history.pushState(obj, obj.Page, obj.Url);
        } else {
            alert("Browser does not support HTML5.");
        }
} | 
 
Merci pour vos aides
						
					
Partager