Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function () {
- $('#link').click(function() {
- $.ajax({
- url: "http://localhost:8085/KPIAdmin/kpis/get",
- type: "GET",
- data: {
- param1: "value1",
- param2: "value2"
- },
- success: function() {
- alert("Success!");
- },
- error: function (jqXHR, textStatus, errorThrown) {
- console.log(jqXHR);
- console.log(textStatus);
- console.log(errorThrown);
- },
- });
- });
- });
- @RequestMapping(value="/get", method=RequestMethod.GET)
- public void ajaxGetKPI(@RequestParam("param1") String param1, @RequestParam("param2") String param2) {
- System.out.println("param1: " + param1);
- System.out.println("param2: " + param2);
- }
- Object { readyState: 4, getResponseHeader: .ajax/v.getResponseHeader(), getAllResponseHeaders: .ajax/v.getAllResponseHeaders(), setRequestHeader: .ajax/v.setRequestHeader(), overrideMimeType: .ajax/v.overrideMimeType(), statusCode: .ajax/v.statusCode(), abort: .ajax/v.abort(), state: .Deferred/d.state(), always: .Deferred/d.always(), then: .Deferred/d.then(), 11 weitere… } ajaxGetKPI.js:24
- "error" ajaxGetKPI.js:25
- "Not Found"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement