Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > AJAX
AJAX Forum sur la programmation AJAX. Avant de poster : Cours AJAX, FAQ AJAX, Toutes les FAQ JavaScript
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 29/09/2008, 13h08   #1
Membre régulier
 
Inscription : mars 2006
Messages : 189
Détails du profil
Informations forums :
Inscription : mars 2006
Messages : 189
Points : 99
Points : 99
Envoyer un message via MSN à spax
Par défaut contenu d'un Tableau mise a jour dynamiquement GRR

Bonjour , mon but et de changer le contenue d'une table selon un choix effectuer par l'utilisateur ( update time qui est stocker dans une BD)

le problème c'est de une j'ai un soucis bizzard :

Code :
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
 
 
function execute (page ,args){
 var xhr_obj = null;
 
 if(window.XMLHttpRequest)  //Firefox
 {
    xhr_obj = new XMLHttpRequest();
	}
 
 else if(window.ActiveXObject) // Internet Explorer
	{
    try {
		xhr_obj= new ActiveXObject("Msxml2.XMLHTTP");
		}
	catch (e) {
		xhr_obj = new ActiveXObject("Microsoft.XMLHTTP");
		}
 
 }
  else {
    alert("Votre navigateur ne supporte pas les objets XMLHttpRequest");
    return;
 }
 
 /*
*/
 var data     = null; 
	if(args != 'ClientslistDate')
	{
		var feature = document.getElementById('os').value;
		var data = page+"?os=" + feature ;
	}
	else
	{
		var timestamp = document.getElementById("dateFilter").value ;
		var data = page+"?timestamp=" + timestamp ;
	}
 
 
 
 /**/
   xhr_obj.onreadystatechange = function()
 {
 
		if (xhr_obj.readyState == 4) {
			if (xhr_obj.status ==200) {
//si c'est la feature et la liste des clients on met a jour 
				if(args ='ClientslistDate')
				{
//Mettre a jour le contenu de la table :
//
					document.getElementById('tabID').innerHTML = xhr_obj.responseText;
					}
 
			}
			else {
				alert("Problem: " + xhr_obj.statusText);
			}
		}
		}
 xhr_obj.open("GET", data, true);  // Mode synchone
 xhr_obj.send(null);
 
 
}
le premier est le fait que
Code :
1
2
3
4
5
6
7
 
				if(args ='ClientslistDate')
				{
//Mettre a jour le contenu de la table :
//
					document.getElementById('tabID').innerHTML = xhr_obj.responseText;
					}
que la condition soit vrai ou faut le

Code :
1
2
 
document.getElementById('tabID').innerHTML = xhr_obj.responseText;
est executer !!!

le deuxieme , et c'est toujours la même ligne sur firefox ca marche ( avec le précédent problème mais sur IE cette ligne créer un problème ca marche pas .

des idées ? merci
spax est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/09/2008, 13h11   #2
Responsable Développement Web

 
Avatar de Bovino
 
Homme Didier Mouronval
Développeur Web
Inscription : juin 2008
Messages : 13 828
Détails du profil
Informations personnelles :
Nom : Homme Didier Mouronval
Âge : 41
Localisation : France, Gironde (Aquitaine)

Informations professionnelles :
Activité : Développeur Web
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : juin 2008
Messages : 13 828
Points : 35 998
Points : 35 998
Code :
if(args ='ClientslistDate')
Ce n'est pas une condition mais une affectation, dont le résultat booléen est true, donc on rentre dans la condition...
Pour une comparaison :
Code :
if(args =='ClientslistDate')
__________________
Pas de question technique par MP !
Tout le monde peut participer à developpez.com, vous avez une idée, contactez-moi !
Vous possédez un blog et aimeriez diffuser vos billets sur le forum, contactez-moi !
Mes formations video2brain : La formation complète sur JavaScriptJavaScript et le DOM par la pratiquePHP 5 et MySQL : les fondamentaux
Mon livre sur jQuery
Bovino est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/09/2008, 13h20   #3
Membre régulier
 
Inscription : mars 2006
Messages : 189
Détails du profil
Informations forums :
Inscription : mars 2006
Messages : 189
Points : 99
Points : 99
Envoyer un message via MSN à spax
Ah la boulette comment passer de != au == tss j'ai simplement suprimer le !

sinon pourquoi le même script ne marche pas sur IE ca bloque sur cette ligne :

Code :
1
2
 
document.getElementById('tabID').innerHTML = xhr_obj.responseText;
htmlfile : erreur d'execution inconnus
spax est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/09/2008, 14h54   #4
Responsable Modération
 
Homme
Inscription : janvier 2007
Messages : 9 316
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Isère (Rhône Alpes)

Informations professionnelles :
Secteur : Finance

Informations forums :
Inscription : janvier 2007
Messages : 9 316
Points : 15 522
Points : 15 522
Bonjour,
Citation:
Envoyé par spax Voir le message
htmlfile : erreur d'execution inconnus
pour celui-là, il faudrait le code HTML de la page ...

A+
E.Bzz est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/09/2008, 14h59   #5
Membre régulier
 
Inscription : mars 2006
Messages : 189
Détails du profil
Informations forums :
Inscription : mars 2006
Messages : 189
Points : 99
Points : 99
Envoyer un message via MSN à spax
ca fera un peu beaucoup :s
Code :
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
	<head>
		<link href="styles.css" rel="styleSheet" type="text/css">
	</head>
	<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tbody>
		<tr>
		<td>
	<a href="http://portal" target="_top">				
						<img src="images/logo.jpg" alt="" title="" border="0" width="220px" height="66px">
					</a>
	</td>
			</tr>
			<tr>
			<td valign="top" width="230px">	
<table width="230px">
<tr><td class='lftnav1'>Logged in as superadmin<br /><br />
 <form action='disconnect.php' method='POST'>
<input type='submit' value='Log out !'/>
 </form>
</td></tr><tr><td class="lftnav1"><a href="index.php">Index</a></td></tr>
<tr><td class="lftnav1"><a href="data.php">Monitoring</a></td></tr>
<tr><td class="lftnav1"><a href="error.php">Errors log</a></td></tr>
<tr><td class="lftnav1"><a href="features.php">Features</a></td></tr>
<tr><td class="lftnav1"><a href="server.php">Servers</a></td></tr>
<tr><td class="lftnav1"><a href="user.php">User</a></td></tr>
<tr><td class="lftnav1"><a href="var.php">System variables</a></td></tr>
<tr><td class="lftnav1"><a href="fvar.php">Features variables</a></td></tr>
<tr><td class="lftnav1"><a href="tests.php">Diagram</a></td></tr> 
</table></td>
 
 
<td class="page">
 
 
 
<script type="text/javascript">
			function setXhr()
			{
				var xhr;
				if(window.XMLHttpRequest) // FIREFOX
					xhr = new XMLHttpRequest();
				else if(window.ActiveXObject) // IE
					xhr = new ActiveXObject("Microsoft.XMLHTTP");
				else 
				{ // XMLHttpRequest non supporté par le navigateur  
				} 
				return xhr;
			}
 
			function tri(id,server,name,arg,tri)
			{
					/* Used navigation ? */
					var xhr = setXhr();
					/* XML HTTPREQUEST :  Get ,  file+args , blocking request = YES */
					xhr.open("GET", 'include/requetetrieur.php?server='+server+'&name='+name+'&arg='+arg+'&tri='+tri,false);
					xhr.send(null);
					document.getElementById(id).innerHTML = xhr.responseText;
					color();
			}
</script>
<script type="text/javascript">
			function setXhr()
			{
				var xhr;
				if(window.XMLHttpRequest) // FIREFOX
				 xhr = new XMLHttpRequest();
				else if(window.ActiveXObject) // IE
				xhr = new ActiveXObject("Microsoft.XMLHTTP");
				else
				{}
				return xhr;
			}
 
			function getServer()
			{
				var site = document.getElementById("lssite").options[document.getElementById("lssite").selectedIndex].value;
 
					var xhr = setXhr();
					xhr.open("GET", 'include/filteredserver.php?site='+site,false);
					xhr.send(null);
					var tab = xhr.responseText.split("|");
					var liste = document.getElementById("lsserver");
					liste.options.length = 0;
					liste.options[0] = new Option("All");
					for(var i=0;i<tab.length-1;i++)
					{
					liste.options[i+1] = new Option(tab[i]);
					}
			}
</script>
 
 
	<form method="POST" action="data.php">
	<p>
	<label>Site</label>
	<select name="site" id="lssite" onChange="getServer()">
	<option value="All">All</option>
	<option value='Sophia'>Sophia</option><option value='Illkirch' selected='selected'>Illkirch</option>	</select>
	<label>server</label>
	<select name="server" id="lsserver">
	<option value="All">All</option>
 
	<option value='frillsdev03'>frillsdev03</option><option value='diva' selected='selected'>diva</option>	</select>
 
	<label>Feature</label>
	<select id ="feature" name="feature">
	<option value="All">All</option>
	<option value='clientslist' selected='selected'>clientslist</option><option value='oploglist'>oploglist</option><option value='replicalist'>replicalist</option><option value='triggerlist'>triggerlist</option><option value='voblist'>voblist</option>	</select>
	<input type="submit" value="Go !" />
	</p>
	</form>
 
	<script type="text/javascript">
 
 
/*************************************************************************************************
* Function  : color()
*  Coloring the lignes with diff value equals the entred text : oplogDIFF 
*
**************************************************************************************************/
 
function color()
{
	var tab = document.getElementsByTagName('td');
	var temp="";
	var td = new Array();
	var k=0;
	var modele = /diff/i;
	for(var i=0;i<tab.length;i++)
	{
		if(modele.test(tab[i].id))
		td[k++] = tab[i].id;
	}
 
	for(var i=0;i<td.length;i++)
	{
	temp = td[i];
	temp = temp.replace("diff","ligne");
	document.getElementById(temp).style.backgroundColor= "white";
		var value = document.getElementById("oploglimitvalue").value;
		value = parseInt(value,10);
		if(document.getElementById(td[i]).innerHTML.valueOf()>value)
		{
			document.getElementById(temp).style.backgroundColor= "red";
		}
	}
}
 
/*************************************************************************************************
* Function  : OSFilter()
*  Filtring clients list with the selected operation system .
*
**************************************************************************************************/
function OSFilter()
{
	var tab = document.getElementsByTagName('td');
	var temp="";
	var versionCC="";
	var selectedCC="";
	var td = new Array();
	var k=0;
	var modele = /os/i;
	for(var i=0;i<tab.length;i++)
	{
		if(modele.test(tab[i].id) )
		td[k++] = tab[i].id;
 
	}
 
	for(var i=0;i<td.length;i++)
	{
	temp = td[i];
	temp = temp.replace("os","ligne");
	versionCC = td[i] ;
	versionCC = versionCC.replace("os","version");
	versionCC = document.getElementById(versionCC).innerHTML.valueOf() ;
	selectedCC = document.getElementById("CCVersion").value;
 
	document.getElementById(temp).style.backgroundColor= "white";
		var value = document.getElementById("os").value;
		if(value == "All") document.getElementById(temp).style.display = "";
		else
		{
		if(document.getElementById(td[i]).innerHTML.valueOf().search(value) !=-1 && ( selectedCC =='All' || versionCC == selectedCC))
		{
			document.getElementById(temp).style.display = "";
		}
		else
		{
			document.getElementById(temp).style.display = "none";
 
		}
		}
	}
}
 
/*************************************************************************************************
* Function  : CCVersionFilter()
*  Filtring clients list with the selected CleareCase version
*
**************************************************************************************************/
function CCVersionFilter()
{
	var tab = document.getElementsByTagName('td');
	var temp="";
	var versionOS="";
	var selectedOS="";
	var td = new Array();
	var k=0;
	var modele = /version/i;
	for(var i=0;i<tab.length;i++)
	{
		if(modele.test(tab[i].id) ) 
		td[k++] = tab[i].id;
	}
	for(var i=0;i<td.length;i++)
	{
	temp = td[i];
	temp = temp.replace("version","ligne");
	versionOS = td[i] ;
	versionOS = versionOS.replace("version","os");
	versionOS = document.getElementById(versionOS).innerHTML.valueOf() ;
	selectedOS = document.getElementById("os").value;
	document.getElementById(temp).style.backgroundColor= "white";
 
		var version = document.getElementById("CCVersion").value;
		if(version == "All" ) document.getElementById(temp).style.display = "";
		else
		{
		if(document.getElementById(td[i]).innerHTML.valueOf() == version && ( selectedOS =='All' || versionOS.search(selectedOS) !=-1))
		{
			document.getElementById(temp).style.display = "";
		}
		else
		{
			document.getElementById(temp).style.display = "none";
 
		}
		}
	}
}
 
 
/*************************************************************************************************
* Function  : execute()
*  Executer un script php avec ajax xmlhttprequest
*
**************************************************************************************************/
function execute (page ,args){
 var xhr_obj = null;
 
 if(window.XMLHttpRequest)  //Firefox
 {
    xhr_obj = new XMLHttpRequest();
	}
 
 else if(window.ActiveXObject) // Internet Explorer
	{
    try {
		xhr_obj= new ActiveXObject("Msxml2.XMLHTTP");
		}
	catch (e) {
		xhr_obj = new ActiveXObject("Microsoft.XMLHTTP");
		}
 
 }
  else {
    alert("Votre navigateur ne supporte pas les objets XMLHttpRequest");
    return;
 }
 
 /*
*/
	var data     = null; 
	var server = document.getElementById("lsserver").value ;
	var feature = document.getElementById("feature").value ;
	if(args != 'ClientslistDate')
	{
		var timestamp = document.getElementById("dateFilter").value ;
		var feature = document.getElementById('os').value;
		data = page+"?server="+server+"&feature="+feature+"&timestamp=" + timestamp ;
	}
	else
	{
		var timestamp = document.getElementById("dateFilter").value ;
		data = page+"?server="+server+"&feature="+feature+"&timestamp=" + timestamp ;
	}
 
 
 
 /**/
   xhr_obj.onreadystatechange = function()
 {
 
		if (xhr_obj.readyState == 4) {
			if (xhr_obj.status ==200) {
				if(args =='ClientslistDate')
				{
					document.getElementById('tabID').innerHTML = xhr_obj.responseText;
					}
 
			}
			else {
				alert("Problem: " + xhr_obj.statusText);
			}
		}
		}
 xhr_obj.open("GET", data, true);  // Mode synchone
 xhr_obj.send(null);
 
 
}
 
 
 
 
 
/*************************************************************************************************
* Function  : PopupImage()
*  popup 
*
**************************************************************************************************/
function PopupImage(img) { 
 
var args ;
 
execute("scripts/dataPlot.php" , args);
 
var image = "images/myData.png";
 
titre="Agrandissement"; 
w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no'); 
w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>"); 
w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+30); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>"); 
w.document.write("<BODY onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
w.document.write("<TD valign='middle' align='center'><IMG src='"+image+"' border=0 alt='Mon image'>"); 
w.document.write("</TD></TR></TABLE>");
w.document.write("</BODY></HTML>"); 
w.document.close(); 
} 
 
 
 
/*************************************************************************************************
* Function  : dateFilter()
*  Filtring clients list with the selected CleareCase version
*
**************************************************************************************************/
function dateFilter()
{
execute("include/get.php" , "ClientslistDate");	
 
 
}
 
 
 
</script><script type="text/javascript">
			function setXhr()
			{
				var xhr;
				if(window.XMLHttpRequest) // FIREFOX
					xhr = new XMLHttpRequest();
				else if(window.ActiveXObject) // IE
					xhr = new ActiveXObject("Microsoft.XMLHTTP");
				else 
				{ // XMLHttpRequest non supporté par le navigateur  
				} 
				return xhr;
			}
 
			function tri(id,server,name,arg,tri)
			{
					/* Used navigation ? */
					var xhr = setXhr();
					/* XML HTTPREQUEST :  Get ,  file+args , blocking request = YES */
					xhr.open("GET", 'include/requetetrieur.php?server='+server+'&name='+name+'&arg='+arg+'&tri='+tri,false);
					xhr.send(null);
					document.getElementById(id).innerHTML = xhr.responseText;
					color();
			}
</script>
 
<label>Clients Operating System </label>
	<select id="os" name="OperatingSystem" onchange="OSFilter()">
	<option value="All">All OS's</option>
	{
		<option value="Windows">Windows OS clients</option>
		<option value="SunOS">SunOS OS clients</option>
		<option value="Linux">Linux OS clients</option>
	}
	</select>
 
	</br>
 
 
	<label>Clients ClearCase Version </label>
	<select id="CCVersion" name="ClearcaseVersion" onchange="CCVersionFilter()">
	<option value="All" selected ='selected'>All Versions </option><option value='ClearCase 2002.05.00+ '>ClearCase 2002.05.00+ </option><option value='ClearCase 2003.06.10+ '>ClearCase 2003.06.10+ </option><option value='ClearCase 7.0.1.1-IFIX01 '>ClearCase 7.0.1.1-IFIX01 </option><option value='ClearCase 7.0.1.0-IFIX01 '>ClearCase 7.0.1.0-IFIX01 </option><option value='ClearCase 7.0.1.1-IFIX02 '>ClearCase 7.0.1.1-IFIX02 </option><option value='ClearCase 7.0.1.1 '>ClearCase 7.0.1.1 </option></select><input type="button" onClick="PopupImage()" value="See divergence !" />
	</br>
 
	<label>Data update time</label>
	<select id="dateFilter" name="dateFilter" onchange="dateFilter()">
	<option value='1222337338'>25/09/08 - 12:08:58</option><option value='1222337269'>25/09/08 - 12:07:49</option><option value='1222337201'>25/09/08 - 12:06:41</option><option value='1222337132'>25/09/08 - 12:05:32</option></select><p>diva :  list of all clients</p><p id='divaclientslist'><table id='tabID' name='tabID' border=1><tr><th><table><tr><td>name </td><td>
			<input type='button' onClick="tri('divaclientslist','diva','clientslist','name','ASC')" value='&#8743;' /></td><td>
		<input type='button' onClick="tri('divaclientslist','diva','clientslist','name','DESC')" value='&#8744;' /></td></tr></table>
		</th><th><table><tr><td>server </td><td>
			<input type='button' onClick="tri('divaclientslist','diva','clientslist','server','ASC')" value='&#8743;' /></td><td>
		<input type='button' onClick="tri('divaclientslist','diva','clientslist','server','DESC')" value='&#8744;' /></td></tr></table>
		</th><th><table><tr><td>version </td><td>
			<input type='button' onClick="tri('divaclientslist','diva','clientslist','version','ASC')" value='&#8743;' /></td><td>
		<input type='button' onClick="tri('divaclientslist','diva','clientslist','version','DESC')" value='&#8744;' /></td></tr></table>
		</th><th><table><tr><td>os </td><td>
			<input type='button' onClick="tri('divaclientslist','diva','clientslist','os','ASC')" value='&#8743;' /></td><td>
		<input type='button' onClick="tri('divaclientslist','diva','clientslist','os','DESC')" value='&#8744;' /></td></tr></table>
		</th><th><table><tr><td>timestamp </td><td>
			<input type='button' onClick="tri('divaclientslist','diva','clientslist','timestamp','ASC')" value='&#8743;' /></td><td>
		<input type='button' onClick="tri('divaclientslist','diva','clientslist','timestamp','DESC')" value='&#8744;' /></td></tr></table>
		</th></tr><tr id=divaclientslistligne0 name=divaclientslistligne0><td >ai</td><td >diva</td><td  id='divaclientslistos1' >SunOS 5.8 Generic_117350-43 sun4u</td><td >25/09/08 - 12:07:49</td></tr><tr id=divaclientslistligne2 name=divaclientslistligne2><td >van</td><td >diva</td><td  id='divaclientslistversion2' >ClearCase 2003.06.10+ </td><td  
..
 
..
 
...
 
id='divaclientslistos283' >Linux 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686</td><td >25/09/08 - 12:07:49</td></tr></table></p>	<script type="text/javascript">
	color();
	</script>
	</td></tr></table>
	</body>
	</html>
spax est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/09/2008, 15h01   #6
Membre régulier
 
Inscription : mars 2006
Messages : 189
Détails du profil
Informations forums :
Inscription : mars 2006
Messages : 189
Points : 99
Points : 99
Envoyer un message via MSN à spax
le debugger me dit que c'est la ligne 301 qui est :

Code :
1
2
 
	document.getElementById('tabID').innerHTML = xhr_obj.responseText;
et cette ligne marche sans problème sous firefox
spax est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/09/2008, 12h17   #7
Responsable Modération
 
Homme
Inscription : janvier 2007
Messages : 9 316
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Isère (Rhône Alpes)

Informations professionnelles :
Secteur : Finance

Informations forums :
Inscription : janvier 2007
Messages : 9 316
Points : 15 522
Points : 15 522
Une remarque :
Code :
1
2
3
			else {
				alert("Problem: " + xhr_obj.statusText);
			}
Tu devrais enlever cette ligne : en cas d'erreur, il me semble bien que statusText n'est pas accessible (=> erreur)

Sinon, que te retourne la réponse Ajax ?
Si c'est le contenu de la table sans les balises <table></table>, essaye de les ajouter et de remplacer
Code :
document.getElementById('tabID').innerHTML = xhr_obj.responseText;
par
Code :
document.getElementById('tabID').parentNode.innerHTML = xhr_obj.responseText;
Les modifications de structures de table via innerHTML peuvent être mal supportées par le nav.

Si ça ne fonctionne toujours pas, il faudra passer par les instructions DOM liées aux tables ...

A+
E.Bzz est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/09/2008, 15h17   #8
Membre régulier
 
Inscription : mars 2006
Messages : 189
Détails du profil
Informations forums :
Inscription : mars 2006
Messages : 189
Points : 99
Points : 99
Envoyer un message via MSN à spax
après plusieurs tentatives et recherches bien a ce qu'il parait c'est un bug IE déclare Microsoft si je me souvient bien jusqu'au version : 5.5 mais ca traine toujours on dirai .
une solution qui marche chez moi c'est créer un div et mettre la Table dedant puis de même de l'autre coté creer une réponse en div( contenant la nouvelle table ) et a la récéption remplacer

ca a l'air de marcher .

merci en tous cas .
spax est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/09/2008, 15h50   #9
Responsable Modération
 
Homme
Inscription : janvier 2007
Messages : 9 316
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France, Isère (Rhône Alpes)

Informations professionnelles :
Secteur : Finance

Informations forums :
Inscription : janvier 2007
Messages : 9 316
Points : 15 522
Points : 15 522
Citation:
Envoyé par spax Voir le message
une solution qui marche chez moi c'est créer un div et mettre la Table dedant puis de même de l'autre coté creer une réponse en div( contenant la nouvelle table ) et a la récéption remplacer

ca a l'air de marcher .
Bah oui : c'est ce que je te proposais ci-dessus (avec ton bloc <p> existant au lieu du div)

A+
E.Bzz est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 07/10/2008, 14h19   #10
Membre régulier
 
Inscription : mars 2006
Messages : 189
Détails du profil
Informations forums :
Inscription : mars 2006
Messages : 189
Points : 99
Points : 99
Envoyer un message via MSN à spax
Merci javais pas tout compris parentNode me disait rien lol
spax est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 06h45.


 
 
 
 
Partenaires

Hébergement Web