Maintenant Tout ce code fonctionne très bien dans Firfox mais dans IE les divs ne changent pas lorsque l'information php change. Peut-on m'aider s'il vous plaît que je travaille sur un projet et cela me retient Merci.jQuery & PHP et MYSQL IE Problème
Voici le code jQuery :
.ajaxSetup $ ({cache: false}); $ (document) .ready (function() { $ ("# not"). Css ('display', 'none'); $ ("# fonline"). Css ('Afficher', 'Aucun') $ (. "n pas") cacher();
$ ("# fEn") cacher();.
$ ("# shfm") cliquez sur (function (.) { $ ("# non ") cacher();.
$ (" # fEn ") toggle(); });
$ (" # notifi ") cliquez sur (function() { $ (" # fEn ") .hide();
$ (" # not "). toggle() });
});
Fonction de fermeture de boîtes() { $ ("# fonline"). Hide(); $ ("# not"). Hide(); } function loadContent (id) { $ ("# contentArea"). Load ("notifications.php? O =" + id + ""); }; .
$ (document) .ready (function() {
$ ("# paramètres") à bascule (fonction () { $ (this) .html ('X Fermer');} , function() { $ (this) .html ('Settings'); } ); });
fonction AmisContent (id) { $ ("# fArea"). Load ("friends_online.php? Fo =" + id + ""); }; .
$ (document) .ready (function() { $ ("# Options") à bascule (fonction () { $ (this) .html ('X Fermer');} ,
fonction() { $ (this) .html ('options');} ); });
var = refreshId setInterval (function() { $ ('# Farea') fadeOut ("lent") charge ('response.php') fadeIn ("lent"),... }, 10000)
Code PHP:
$ cOption = $ _GET [ 'fo'];
switch($cOption) {
case 1:
$recordsPerPage = 5;
$pageNum = 1;
if(isset($_GET['pg'])) {
$pageNum = $_GET['pg'];
settype($pageNum, 'integer');
}
echo "<table width='98%' border='0' cellspacing='0' cellpadding='0'>";
$offset = ($pageNum - 1) * $recordsPerPage;
$onlineresult = mysql_query("SELECT * FROM online") or die (mysql_error());
while ($ousers = mysql_fetch_array($onlineresult)) {
$onuid = $ousers['uid'];
$flist = mysql_query("SELECT * FROM friends_list WHERE fid='$onuid' AND uid='$myid' LIMIT $offset, $recordsPerPage;") or die (mysql_error());
while ($fri = mysql_fetch_array($flist)) {
$id = $fir['id'];
$uid = $fri['uid'];
$fid = $fri['fid'];
$userinfomation = mysql_query("SELECT * FROM accounts WHERE id='$fid'");
$userinfo = mysql_fetch_array($userinfomation);
$v_tgid = $userinfo['tgid'];
echo "
<tr class='menutxt2'>
<td width='11%' height='21'><center>
</center></td>
<td width='50%'><a href=\"javascript:void(0)\" onClick=\"javascript:chatWith('$v_tgid')\">$v_tgid</a></td>
<td width='39%'>View Profile</td>
</tr>
";
}
}
echo "</table>";
$query = "SELECT COUNT(id) AS id FROM friends_list;";
$result = mysql_query($query) or die('Mysql Err. 2');
$row = mysql_fetch_assoc($result);
$numrows = $row['id'];
$maxPage = ceil($numrows/$recordsPerPage);
$nav = '';
for($page = 1; $page <= $maxPage; $page++)
{
if ($page == $pageNum)
{
$nav .= "<span class='menutxt'>Pages: $page </span>";
}
else
{
$nav .= "";
}
}
if ($pageNum > 1) {
$page = $pageNum - 1;
$prev = "";
$first = "";
}
else {
$prev = '';
$first = '';
}
if ($pageNum < $maxPage) {
$page = $pageNum + 1;
$next = "";
$last = "";
}
else {
$next = '';
$last = '';
}
echo "$first <b>$prev</b> $nav<b> $next</b> $last";
echo "
";
break;
case 2:
echo 'Options';
break;
default:
echo 'Whoops, didn\'t understand that option: <i>'.$cOption.'</i>';
}
pourrait vous (ou toute personne ayant la capacité de 'modifier') modifier ce poste il est donc plus lisible? – andyk
J'ai utilisé le bouton de code, mais je ne vais pas patauger et améliorer l'indentation. – tvanfosson
avez-vous un lien direct n'importe où? –