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
|
<?
include ("inc/connexion.php");
$query = "SELECT * FROM pages order by page";
$result = mysql_query($query, $lien);
while($ok = mysql_fetch_array($result))
{
echo '<a id="'.$ok['page'].'" href="dossier_ajax2.php">';
?>
<script type="text/javascript">
var url='/developpeur/dossier_ajax_recu.php';
var parametre='page=<?php echo $ok['page']; ?>';
var ajax<?php echo rand(1, 10);?> = new Ajax.Updater(
{success: 'datestr'}, // DIV id (XXX: doesnt work?)
url, // URL
{ // options
method:'get', parameters: parametre, onFailure: reportError,
onComplete: showResponse, evalScripts:true
});
function showResponse(req)
{
$('datestr').innerHTML = req.responseText;
//new Effect.toggle('datestr','BLIND');
new Effect.Highlight('datestr', { startcolor:'#33CCFF', endcolor:'#3366FF', restorecolor:'#33CCFF', duration: 2});
//stop(event);
}
function reportError(request)
{
alert('Sorry. There was an error.');
}
</script>
<?php echo $ok['page'].'</a><br />'; } ?>
<div id="datestr" style="display:block; width:25em;"></div> |
Partager