Jahia Dev Forum > Use json object...

1 (1 Good)
0 (0 Bad)

Use json object from ActionResult

by  kissenlall »  2013/02/28 19:59

Hi.

I am currently returning a json object in my action result from an action. this redirects to a jsp page. I want to be able to access the json object returned from the action in this jsp page.

How to achieve that?

Many Thanks

Kissenlall

 

 

 

 

  (kissenlall)

Number of messages  7
Registration date
0 (0 Good)
0 (0 Bad)

Re: Use json object from ActionResult

by  dgriffon »  2013/03/06 10:25

to handle the json answer, you have to use an ajax call.

with Jquery for example :

 

$.getJSON("/jsonUrl.html", function(json) {
// here you can parse the json object as wanted
   alert("JSON Data: " + json);
 });

you can find more information here : http://api.jquery.com/jQuery.getJSON

best regards

David 

David Griffon (dgriffon)

Number of messages  76
Registration date
Contact
Share
Feedback

Get in touch

Whether you are a current user or if you are just evaluating Jahia, we are here to help.

Contact us

Share this page