Skip to Content
author's profile photo Former Member
Former Member

Response from xsjs during ajax call from ui5

Hi,

I am trying to pass a var from xsjs as respond to ajax call from my ui5 application after some database operation in hana,i got correct output but ajax call redirect to error method and give alert below

123.png (5.8 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Nov 19, 2015 at 03:15 PM

    what do you see in dev tools/ network as a response for that xsjs call? is it even json?

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 19, 2015 at 04:17 PM

    unexpected token is usually due to a malformed JSON.

    Make sure you put your output as:

    $.response.setBody( JSON.stringify(yourOutputObject) );

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.