Bonjour,

Après diverses recherches j'ai n'ai pu trouver mon problème....
En fait j'ai une page home.php
Code php : Sélectionner tout - Visualiser dans une fenêtre à part
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
36
37
38
39
40
41
42
43
<?php
session_start(); // On relaye la session
if (isset($_SESSION['authentification'])){ 
	if($_SESSION['privilege'] <= '1') 
		  	{ 
require_once('../connexion/connexion.php');
mysql_query("SET NAMES UTF8");
mysql_select_db($database, $bd_inter);
?>
<html>
		<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8;">
		<link rel="stylesheet" type="text/css" href="../css/view.css">
		<script type="text/javascript" src="../function/view.js"></script>
		<script type="text/javascript" src="../function/ajaxstats.js"></script>
		<script type="text/javascript" src="../function/jquery.js"></script>
		<script src="../highcharts/js/highcharts.js"></script>
		<script src="../highcharts/js/modules/exporting.js"></script>
<body>
<div>
          <div align="center">
 
    <br>
    <br>
    <div align="center">
              <input type="submit" id="button" name="button" value="button1" onClick="home_button('1')">
              <input type="submit" id="button" name="button" value="button2" onClick="home_button('2')">
    </div>
    <br>
    <br>
  </div>
        </div>
 
<div id="fiab" name="fiab"> </div>
 
<center>
          <a href="../fiche/index.php">
  <h2>Retour accueil</h2>
  </a>
        </center>
</body>
</html>
Quand je click sur un des bouton j'ai un ajax qui s'ouvre dans ma div "fiab"
mon fichier ajaxstats.js:
Code javascript : Sélectionner tout - Visualiser dans une fenêtre à part
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
function home_button(button)
{
		var xhr = getXhr();
 
		xhr.onreadystatechange = function()
		{ 
		if(xhr.readyState == 4 && xhr.status == 200)
		{	
 
			resultat = xhr.responseText;
			document.getElementById('fiab').innerHTML = resultat;			
		}
		else
		{
			load();
		}
		}
 
		xhr.open("POST","traitement/script_home_button.php", true);
		xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
 
		data = "button_fiab="+button;
 
		xhr.send(data);
		//alert("Data envoye :"+data)	
}

Mon fichier script_home_button.php :
Code php : Sélectionner tout - Visualiser dans une fenêtre à part
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
session_start(); // On relaye la session
if (isset($_SESSION['authentification'])){ 
	if($_SESSION['privilege'] <= '1') 
		  	{ 
require_once('../connexion/connexion.php');
mysql_query("SET NAMES UTF8");
mysql_select_db($database, $bd_inter);
?>
//GRAPH 2
//TRAITEMENT PHP
<html>
		<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8;">
		<link rel="stylesheet" type="text/css" href="../css/view.css">
		<script type="text/javascript" src="../function/view.js"></script>
		<script type="text/javascript" src="../function/ajaxstats.js"></script>
		<script type="text/javascript" src="../function/jquery.js"></script>
		<script src="../highcharts/js/highcharts.js"></script>
		<script src="../highcharts/js/modules/exporting.js"></script>
		<script type="text/javascript">
$(function () {
    var chart;
    $(document).ready(function() {
        chart = new Highcharts.Chart({
            chart: {
                renderTo: 'container',
                type: 'column'
            },
            title: {
                text: 'R\351partition'
            },
            subtitle: {
                text: 'Source: TIREX'
            },
            xAxis: {
                categories: [
                    'Jan',
                    'Fev',
                    'Mar',
                    'Avr',
                    'Mai',
                    'Jun',
                    'Jul',
                    'Aou',
                    'Sep',
                    'Oct',
                    'Nov',
                    'Dec'
                ]
            },
            yAxis: {
                min: 0,
                title: {
                    text: 'Nbr '
                }
            },
            legend: {
                layout: 'vertical',
                backgroundColor: '#FFFFFF',
                align: 'left',
                verticalAlign: 'top',
                x: 100,
                y: 30,
                floating: true,
                shadow: true
            },
            tooltip: {
                formatter: function() {
                    return ''+
                        this.x +': '+ this.y +' EO';
                }
            },
            plotOptions: {
                column: {
                    pointPadding: 0.1,
                    borderWidth: 0
                }
            },
                series: [{
                name: '5600 4C',
				data: [<?php echo join(',', $tab_5600_4);  ?>]    
            },{
                name: '5600 6C',
				data: [<?php echo join(',', $tab_5600_6C);  ?>]
 
            }, {
                name: '8800 C',
				data: [<?php echo join(',', $tab_8800_C);  ?>]
 
            },{
                name: '8800 U',
				data: [<?php echo join(',', $tab_8800_U);  ?>]
 
            }, {
                name: '20500 C',
				data: [<?php echo join(',', $tab_20500_C);  ?>]
 
            }, {
                name: '20900 C',
				data: [<?php echo join(',', $tab_20900_C);  ?>]
 
            }]
        });
    });
 
});
</script>

Mon problème viens du faite que malgré de multitude d'essai mon graph ne s'affiche pas quand je le charge viens l'ajax. Faire un graph sur le fichier home il n' y a pas de soucis, mais par contre faire un graph dans le fichier chargé en ajax je n'y arrive pas.Je pense que je doit avoir une erreur sur mon <script javascript> mais je n'arrive pas à résoudre mon soucis.