Hello Tyk, thank you for your help,
No, it's not the entire page I've copy in the message, just a piece of
it to show what can be malfunctioning.
When I don't use Request.HTML to load my PHP page, it'll display
correctly and this is also the case when I use the 1.1 version of
Mootools, like this :
window.addEvent('domready', function(){
$('pres').addEvent('click', function(e) {
var url = "site/accueil.php";
var options = {method : 'get' , update: $('main_frame'),
evalScripts: true};
var monObjetAjax= new Ajax(url, options);
monObjetAjax.request();
});
});
In fact, there is an "echo $html" at the end of the loaded page, but
it seems that the version 1.2 of Mootools don't take care of it.
It'll take a lot of place on this message, but here is the entire php
page, just in case the problem would come from it :
<!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>
<title>Rêve à l'envers - News</title>
<meta name="description" content="Page des news relatives au site et à
l'artiste peintre">
<meta name="keywords" content="peinture, sous-verre, tableau, art,
rêve à l'envers, artiste, peintre, mulhouse, news,
nouvelles">
<meta name="robots" content="index , follow">
<meta name="author" content="Jérémie SCHEER">
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" /
>
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body class="visitorSite">
<div class="container">
<?php
require '../connexion.inc';
connexion();
if(!isset($_GET['idNews'])){
$req = mysql_query("select noNews, author, sujet, DATE_FORMAT(time,
'%d/%m/%Y \à %H:%i:%S'), editAuthor from NEWS order by time
DESC") or die (mysql_error());
$count = 0;
$html="<div class=\"titre\">
Liste des news
</div><div>";
while($news = mysql_fetch_row($req)){
$news[1]=htmlspecialchars($news[1], ENT_QUOTES);
$news[2]=htmlspecialchars($news[2], ENT_QUOTES);
$news[4]=htmlspecialchars($news[4], ENT_QUOTES);
$html=$html."<hr noshade=\"noshade\" size=\"5\"><ul type=\"square
\"><li>";
$html=$html."<p class=\"titre\"><b>";
if($news[4]!=""){
$html=$html."[Editée] ";
}
$html=$html."$news[3] par $news[1]</b></p>";
$html=$html."<blockquote><p class=\"text20\"><i>$news[2]</i></p></
blockquote><br>";
$html=$html."<a class=\"visitorSite\" id=\"anews\" href=\"site/
news.php?idNews=$news[0]\">Afficher la news</a></ul>";
$count++;
}
if($count==0){
$html=$html."<div class=\"defaultTitle\">Aucune news disponible</
div>";
}
$html=$html."</div>";
echo $html;
}else{
if(is_numeric($_GET['idNews'])){
$idNews = $_GET['idNews'];
$req = mysql_query("select noNews, DATE_FORMAT(time, '%d/%m/%Y
\à %H:%i:%S'), author, sujet, texte, editAuthor,
DATE_FORMAT(editDate, '%d/%m/%Y \à %H:%i:%S') from NEWS where
noNews='$idNews'") or die(mysql_error());
$news = mysql_fetch_row($req);
$news[2]=htmlspecialchars($news[2], ENT_QUOTES);
$news[3]=htmlspecialchars($news[3], ENT_QUOTES);
$news[4]=nl2br(htmlspecialchars($news[4], ENT_QUOTES));
$news[5]=htmlspecialchars($news[5], ENT_QUOTES);
$html="<div class=\"titre\">
$news[3]
</div><div>";
$html=$html."<hr noshade=\"noshade\" size=\"5\">";
$html=$html."<blockquote><p class=\"text15\"><b>$news[4]</b></p>";
$html=$html."<p class=\"text15\" id=\"pright\">$news[2], le
$news[1]";
if($news[5]!="" && $news[6]!=""){
$html=$html."<br><i>Editée par $news[5] le $news[6]</i>";
}
$html=$html."</p>";
$html=$html."<a class=\"visitorSite\" id=\"anews\" href=\"site/
news.php\">Retour à la liste des news</a></blockquote></div>";
echo $html;
}
}
mysql_close();
?>
</div>
</body>
</html>
PS : Yes, you're right, in fact I've put this evalScripts option by
default on all the loading because most of my pages have Javascript to
evaluate.
PS2 : My english is not perfectly correct neither is it ;-)