How can I pass parameters using JSON, Ajax and JSP?
Hi, I'm trying to use JSON to get some values from a database using Ajax, I'm working with JSP, this is what I'm doing:
- $.ajax({
- type: "POST",
- url: "cutDateEvents.jsp",
- //data: "{cCardDropDown: document.getElementById('cCardDropDown').value, selection: 'FCDT'}",
- success: function(data){
- var output = $.parseJSON(data);
- $("#cutDateTable").append(output.table);
- alert(output.table);
- alert(output.dropDown);
- }
- });
I'm sending two values, one which is a select value and the other a static string value, if I comment that line, it works with no problem, but if I don't nothing happens, I guess it's giving me an error but I can't see it in the Chrome debugger, nothing shows up, any help? thank you!!