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
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
}
[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.
t. Something like this:
> >>
> >> --- MyAjax.html (rendered) -
> >> Wicket.Event.add(window, "domready", function(event) {
> >>
> Wicket.Ajax.ajax({"dt":"json"*,"u":"./?0-
--- MyAjax.html (rendered) -
>> Wicket.Event.add(window, "domready", function(event) {
>> Wicket.Ajax.ajax({"dt":"json"*,"u":"./?0-1.IBehaviorListener.0-ajaxLink"*,"e":"click&q
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