misshasnae
Messages postés7Date d'inscriptionvendredi 26 janvier 2007StatutMembreDernière intervention12 janvier 2009 12 janv. 2009 à 16:26
merci buls pour l'interet que vous apporter a mon probleme.
ben le perobleme c que ce petit exemple ne marche po dans iexplore
voici tt les code
****index.html******
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" media="all" href="style.css" />
<script type="text/javascript" src="jquery.js"></script>
<title>Reading XML with jQuery</title>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
$.ajax({
type: "GET",
url: "sites.xml",
dataType: "xml",
success: function(xml) {
$(xml).find('site').each(function(){
var id = $(this).attr('id');
var title = $(this).find('title').text();
var url = $(this).find('url').text();
$('
').html('['+url+' '+title+']').appendTo('#page-wrap');
$(this).find('desc').each(function(){
var brief = $(this).find('brief').text();
var long = $(this).find('long').text();
$('
this is the brief description.
<long>...and this is the long description. See how long it is :)</long>
</desc>
</site>
<site id ="2">
<title>jaredharbour.com</title>
http://www.jaredharbour.com <desc>
this is the brief description.
<long>...and this is the long description. See how long it is :)</long>
</desc>
</site>
<site id="3">
<title>Css Tricks</title>
http://www.css-tricks.com <desc>
this is the brief description.
<long>...and this is the long description. See how long it is :)</long>
</desc>
</site>
</sites>