Utilisation du framework rico
Bonjour à tous,
Suite au tutorial de siddh sur ajax j'ai voulu "tester" le framework rico de la manière suivante:
sur une page html j'ai un lien "point 1" qui, si on clique dessus, affiche les informations du point 1 dans une balise div.
Voici mon fichier html :
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
|
<html>
<head>
<script src="prototype.js" type="text/javascript"></script>
<script src="rico.js" type="text/javascript"></script>
</head>
<body >
<script>
ajaxEngine.registerRequest( 'getPointInfo', 'http://localhost/webcarte/getPointInfo.php' );
ajaxEngine.registerAjaxElement( 'pointInfo' );
function getPointInfo1(pointID) {
alert('db1b');
ajaxEngine.sendRequest( 'getPointInfo', "pointID="+pointID);
alert('db1c');
}
</script>
<div id="pointInfo">
hgfghfghfgh fr f dsfsf sdfsd
</div>
<a href="javascript:getPointInfo1(1)">point 1a</a>
</body>
</html> |
L'url http://localhost/webcarte/getPointInfo.php?pointID=1 revoie comme code xml :
Code:
1 2 3 4 5 6 7 8 9 10 11
|
<ajax-response>
<response type="element" id="pointInfo">
<div class="point">
<span class="pointName">Ville 1</span>
<span class="pointAlt">167</span>
<span class="pointLat">45°34'36"N</span>
<span class="pointLong">02°34'34"E</span>
</div>
</response>
</ajax-response> |
Le problème est que rien ne s'affiche dans la balise <div id="pointInfo"> !!
Si vous voyez de quoi cela peut venir ?
Merci
Jérôme
P.S. J'ai posté mon problème sur le forul de rico mais il n'y a pas grand monde !
Re: [AJAX]Utilisation du framework rico
Citation:
Envoyé par planetevoyage
B
Si vous voyez de quoi cela peut venir ?
Problème le plus fréquent: es-tu sur que le XML est bien formé (en tête XML, encodage UTF-8, Mime-type qui convient...)?