Re: Handle JSON response

2013-02-27 Thread abarretto
response (attribute offices) and show it in the div. However, i want to access it using the URL, because, if an error occurs, i willl redirect the request to another server. Thanks, Anderson -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Handle-JSON-response-tp465683

Re: Handle JSON response

2013-02-27 Thread Martin Grigorov
IBehaviorListener.0-ajaxLink&_=1361977209389 > [HTTP/1.1 200 OK 72ms] > [15:00:09.561] Wicket.Ajax: Wicket.Ajax.Call.failure: Error while parsing > response: SyntaxError: JSON.parse: unexpected character > > How you can see, there where two requests. I need that the link do only ON

Re: Handle JSON response

2013-02-27 Thread abarretto
} [15:00:09.462] GET http://localhost:8080/myajax/?0-1.IBehaviorListener.0-ajaxLink&_=1361977209389 [HTTP/1.1 200 OK 72ms] [15:00:09.561] Wicket.Ajax: Wicket.Ajax.Call.failure: Error while parsing response: SyntaxError: JSON.parse: unexpected character How you can see, there where two requests.

Re: Handle JSON response

2013-02-26 Thread Martin Grigorov
t. Something like this: > >> > >> --- MyAjax.html (rendered) - > >> Wicket.Event.add(window, "domready", function(event) { > >> > Wicket.Ajax.ajax({"dt":"json"*,"u":"./?0-

Re: Handle JSON response

2013-02-26 Thread Paul Bors
--- MyAjax.html (rendered) - >> Wicket.Event.add(window, "domready", function(event) { >> Wicket.Ajax.ajax({"dt":"json"*,"u":"./?0-1.IBehaviorListener.0-ajaxLink"*,"e":"click&q

Re: Handle JSON response

2013-02-26 Thread Paul Bors
e = ""; for(var i = 0; i < > data.offices.length; i++) {response += data.offices[i].officeCode + "; " > }$("#content").text(response)}]});; > ;}); > . > href="/mgm/JSONOffice"*>Get JSON > > > My question is: Can I set this automati