I'm a total programming rookie and I really can't get my JSP to send ANYTHING to my servlet. I'm pretty sure the servlet's ok but I have NO IDEA what my submit button in the asp is trying to send to it. It currently looks like this:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Sortable - Drop placeholder</title>
<link rel="stylesheet"
href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<style>
#sortable {
list-style-type: none;
margin: 0;
padding: 0;
width: 60%;
}
#sortable li {
margin: 0 5px 5px 5px;
padding: 5px;
font-size: 1.2em;
height: 1.5em;
}
html>body #sortable li {
height: 1.5em;
line-height: 1.2em;
}
.ui-state-highlight {
height: 1.5em;
line-height: 1.2em;
}
</style>
<script>
var sortableLinks = $("#sortable");
var linkOrderData = $(sortableLinks).sortable('serialize');
var formData =new FormData($(this)[0]);
$( document ).ready(function() {
$('form').on('submit', function (event) {
event.preventDefault();
$.ajax({
url: 'sortcv',
type: 'POST',
data: formData,
async: false,
cache: false,
contentType: false,
processData: false,
success: function (returndata) {
alert(returndata);
}
});
return false;
});
$( "#sortable" ).sortable({
placeholder: "ui-state-highlight"
});
$( "#sortable" ).disableSelection();
});
</script>
</head>
<body>
<form role="form" id="data">
<ul id="sortable">
<li id="1" value ="one" class="ui-state-default">CV1</li>
<li id="2" value ="two" class="ui-state-default">CV2</li>
<li id="3" value ="three" class="ui-state-default">CV3</li>
</ul>
<input type = "submit" value="sortcv" name = "sortcv"/>
</form>
</body>