[ Поиск ] - [ Пользователи ] - [ Календарь ]
Полная Версия: не отправляются данные через ajax на сервер
oenomaus2013
Доброго времени суток!

Подскажите,почему не отправляются данные через ajax на сервер для их дальнейшей обработки?

вот код:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta
http-equiv="content-type" content="text/html; charset=windows-1251" />
<meta
name="Description" content="" />
<meta
name="KeyWords" content="" />

<title>
Сортировка</title>

<link
type="text/css" href="css/jquery-ui-1.8.14.custom.css" rel="stylesheet" />
<!--<script src="scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
-->

<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>

<style>

#sortable { list-style-type: none; margin: 0; padding: 15px 40px 15px 0; width: 200px; }
#sortable li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 15px; cursor:pointer}
#sortable li span { position: absolute; margin-left: -1.3em; }
.block{/*border:1px solid #ccc;*/ width:200px;}
</style>

<script
type="text/javascript">

$(document).ready(function(){
$('#sortable').click(function(){
var arr = 'erer';
//alert(arr);
$.ajax({
url: 's.php',
type: 'POST',
data: {arr:arr,login:'qqq'},
error: function(){
alert('error');
},
success: function(){

}
}
);
});
});

</script>

</head>
<body>
<ul
id='sortable'>
<li
id='1' class='ui-state-default'>dfdfdfdf</li>
</ul>

<?php
print_r($_POST); ?>
</body>
</html>

Быстрый ответ:

 Графические смайлики |  Показывать подпись
Здесь расположена полная версия этой страницы.
Invision Power Board © 2001-2024 Invision Power Services, Inc.