function uploadingprofilemenu(id,page){
$.ajax({
async: false,
url:"action/uploadingprm.php",
type: "POST",
data:{idu: id, whatpage: page},
dataType: "html",
success: function(data){
if(page == 1){
$("#VesContnGlavstranica").empty();
$('#VesContnGlavstranica').html(data);
history.pushState({param: 'Value'}, '', 'id'+id);
}
if(page == 2){
$("#VesContnGlavstranica").empty();
$('#VesContnGlavstranica').html(data);
history.pushState({param: 'Value'}, '', 'gift'+id);
}
}
})
}
uploadingprm.php:
session_start();
$idSe = $_SESSION['id'];
$loginSe = $_SESSION['login'];
$hashSe = $_SESSION['password'];
if ($_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest') {exit("вы пытетсь сделать не XML запрос");}
$whatPage = trim(strip_tags(htmlspecialchars(mysql_real_escape_string($_POST['whatpage']))));
$idUser = trim(strip_tags(htmlspecialchars(mysql_real_escape_string($_POST['idu']))));
if($whatPage == 1){
echo<<<TXT
<div class = "wrapperLeftMenuGlavPage">
<div id = "styleInscriptionMain"><div id = "dlyOtstupovPaddingMain">Меню профиля</div></div>
<ul id = "ulMainProfileUser">
<li class = "active" onclick = "uploadingprofilemenu($idUser,1)"><div id = "hoverUlMineProfileUser">Стена</div></li>
<li class = "noActive" onclick = "uploadingprofilemenu($idUser,2)"><div id = "hoverUlMineProfileUser">Подарки</div></li>
<li class = "noActive"><div id = "hoverUlMineProfileUser">Фотографии</div></li>
<li class = "noActive"><div id = "hoverUlMineProfileUser">Музыка</div></li>
<li class = "noActive"><div id = "hoverUlMineProfileUser">Приложения</div></li>
</ul>
</div>
<div class = "wrapperWallGlavPage">
<div id = "wrapperBlockWriteMessageToVall">
<textarea class = "textareaGlavStranicaWall"></textarea>
<button class = "buttonSendMessgesWall">Отправить</button>
</div>
</div>
TXT;
}
if($whatPage == 2){
include("../page/gift.php");
}
часть кода html:
<div id = "VesContnGlavstranica">
<div class = "wrapperLeftMenuGlavPage">
<div id = "styleInscriptionMain"><div id = "dlyOtstupovPaddingMain">Меню профиля</div></div>
<ul id = "ulMainProfileUser">
<li class = "active" onclick = "uploadingprofilemenu(<?=$idBDInU?>,1)"><div id = "hoverUlMineProfileUser">Стена</div></li>
<li class = "noActive" onclick = "uploadingprofilemenu(<?=$idBDInU?>,2)"><div id = "hoverUlMineProfileUser">Подарки</div></li>
<li class = "noActive"><div id = "hoverUlMineProfileUser">Фотографии</div></li>
<li class = "noActive"><div id = "hoverUlMineProfileUser">Музыка</div></li>
<li class = "noActive"><div id = "hoverUlMineProfileUser">Приложения</div></li>
</ul>
</div>
<div class = "wrapperWallGlavPage">
<div id = "wrapperBlockWriteMessageToVall">
<textarea class = "textareaGlavStranicaWall"></textarea>
<button class = "buttonSendMessgesWall">Отправить</button>
</div>
</div>
</div>
Данный скрипт работает на Denwer ,но не работает на хостинге.
Подскажите почему так?(