Right now I have a JSP page that allows to sort some items, when is ready and a link is clicked a JavaScript function converts all the info into XML (text in a variable), after this i need to send this XML to the JSP page again, i tried putting the info in a hidden input and submitting the form, sending with $.post and a few more jQuery functions but nothing worked. Any ideas?
In my JSP I'm reading the post like this:
<% out.println(request.getParameter("data")); %>
This doesn't work:
xml = "<xml></xml>";
$("#form").submit(function(){
alert("JS: " + $("#data").text());
$("#data").text(xml);
});
This either:
xml = "<xml></xml>";
$("#data").text(xml);
$("#form").submit();
And replacing .text with .html doesn't work too. Any ideas are welcome, thx