Salut à tous,
j'essaie de charger un fichier XML à l'aide de Jquery. Sous firefox, pas de problème, alors que sous IE, rien ne s'affiche. Ça fait deux jours que je cherche la solution, si quelqu'un pouvait m'aider ça serait vraiment cool.
Merci d'avance.
Voici le code que j'ai pour l'instant:
Code : 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 $(document).ready(function(){ $.ajax({ type: "GET", url: "images.xml", dataType: ($.browser.msie) ? "text" : "xml", success: function(xml) { $(xml).find('site').each(function(){ var id = $(this).attr('id'); $('<div class="items" id="link_' + id + '"></div>').appendTo('#Div_XML'); var title = $(this).find('title').text(); $('<div></div>').html(title).appendTo('#link_'+id); $(this).find('desc').each(function(){ var imagelink = $(this).find('imagelink').text(); var description = $(this).find('description').text(); $('<div class="imagelink"></div>').html(imagelink).appendTo('#link_'+id); $('<div class="description"></div>').html(description).appendTo('#link_'+id); }); }); } }); });
		
		
        


  Répondre avec citation

 
 
 
 
 
 
 
 
  
 
 Pas de question technique par MP !



  
Partager