Только что наткнулся на такое непонятно-неприятное событие.
Значить так. есть страница index.php. Туда вживляется <?php include ('guestbook.php'); ?>. на странице guestbook не могу получить данные от сервера. Вот листинг (убрал все лишнее, как мне кажется)
Guestbook.php
Код: Выделить всё
<script type="text/javascript">
<!--
var data = $.ajax ( {
url: "body/scripts/ajax.php",
type: "POST",
data: ({func:'func'}),
dataType: "html",
async: false
}
).responseText;
alert(data);
//-->
</script>
<div id="test" />
<div id="record_list" />
<div id="send_form" />
Код: Выделить всё
<?
header('Content-Type: text/html; charset=utf-8');
if (isset($_POST['func'])) echo '<b>testtt</b>';
?>
jquery-скрипт, для отображения в div`e
Код: Выделить всё
$('#test').append(data);