Я пытался отправить некоторые почтовые данные с помощью ajax-запроса на сервер через таблицы данных, вот мой код
<script type="text/javascript">
//this is the datatable it brings data in json format from server
$(document).ready(function() {
var selected = $("#mainschool_id option:selected").val();
//alert(selected);
$('#example').dataTable({
"bProcessing": true,
"ajax": {
"url": "/nvs/system/modules/NVS.NLI/elements/trainingalldatatable.jsp",
"data": {
data: selected
}
},
"sAjaxSource": "/nvs/system/modules/NVS.NLI/elements/trainingalldatatable.jsp",
"search": {
"smart": false
},
"scrollX": true,
"aoColumns": [{
type: "text"
},
{
type: "number"
},
{
type: "text"
},
{
type: "text"
},
{
type: "text"
},
{
type: "text"
},
{
type: "text"
},
{
type: "text"
},
{
type: "text"
},
{
type: "text"
},
{
type: "text"
},
{
type: "text"
},
{
type: "text"
}]
});
});
</script>
Но это выдает ошибку ajax, каждый раз, когда я использую. Нет конкретного объяснения для использования таблиц данных с jsp и java. Любая помощь будет очень признательна. Спасибо