ajax: sending data to the server
I don't usu.
send data to the server with ajax... I remember from when I first was learning ajax (plain, no jQuery) that you always had to send the data in the form of a query string, which meant at end of url there always had to be a "?"... is this the case with ajax? b/c my data is not getting sent.. my code:
- data = "namePicked=" + names[0];
-
- $.post( "info.jsp?", function( data ) {
- $( ".outputDiv" ).append( data );
- // window.location='info.jsp';
- });
info.jsp
- <%
- String nameChosen = "";
- nameChosen = getParam("namePicked", request);
- %>
- <% out.println(nameChosen); %>
(I have a special fn to get params, that's why not using java conventional getParameter I use this everywhere.. it works fine... so that's not the issue....)
thank you....