Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/435.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQuery&PHP和MYSQL-IE问题_Php_Javascript_Jquery_Internet Explorer - Fatal编程技术网

jQuery&PHP和MYSQL-IE问题

jQuery&PHP和MYSQL-IE问题,php,javascript,jquery,internet-explorer,Php,Javascript,Jquery,Internet Explorer,现在,所有这些代码在Firfox中都可以正常工作,但在IE中,当php信息发生变化时,div不会发生变化 有人能帮我吗?因为我正在做一个项目,这让我很犹豫 多谢各位 以下是jQuery代码: $.ajaxSetup{cache:false}; $document.readyfunction{ $not.css'display','none'; $fonline.css'display','none'; $not.hide; $fonline.hide; $shfm.clickfunction{

现在,所有这些代码在Firfox中都可以正常工作,但在IE中,当php信息发生变化时,div不会发生变化

有人能帮我吗?因为我正在做一个项目,这让我很犹豫 多谢各位

以下是jQuery代码:

$.ajaxSetup{cache:false}; $document.readyfunction{ $not.css'display','none'; $fonline.css'display','none'; $not.hide; $fonline.hide; $shfm.clickfunction{ $not.hide; $fonline.toggle; })

$notifi.clickfunction{ $fonline.hide; $not.toggle; })

})

功能封闭盒{ $fonline.hide; $not.hide; } 函数loadContentid{ $contentArea.loadnotifications.php?o=+id+; };

$document.readyfunction{

$settings.toggle 作用{ $this.html'X Close'; }, 作用{ $this.html'Settings'; } ; };

函数FriendsContentid{ $fArea.loadfriends_online.php?fo=+id+; };

$document.readyfunction{ $Options.toggle 作用{ $this.html'X Close'; },

作用{ $this.html'Options'; } ; };

var refreshId=setIntervalfunction { $'fArea'.fadeOutslow.load'response.php'.fadeInslow; }, 10000;

PHP代码:

$copion=$_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>';
    }

IE倾向于在您不希望的时候缓存ajax请求。代码末尾的.load发出一个GET请求,IE可能正在缓存该请求,而不是从服务器获取


你或任何有“编辑”能力的人能编辑这篇文章,使它更具可读性吗?我用了“代码”按钮,但是我不打算费力地去改进缩进。你有任何地方的实时链接吗?我现在发现了,谢谢你T.Stone,你帮了我很多忙,这行$fArea.loadfriends\u online.php存在缓存问题?fo=+id+它应该是函数唯一的\u requestid{var timestamp=Numbernew Date.toString;var random=Math.random*Math.random*100000*Math.random;var unique=new String;unique=timestamp+random;return unique;}$fArea.loadfriends\u online.php?fo=+id+&random=+unique\u requestid;如果是这样,你应该投票并将他的答案标记为“接受”。