Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7722797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:16:46+00:00 2026-06-01T04:16:46+00:00

I want to make call to authenticate user and get back token in json

  • 0

I want to make call to authenticate user and get back token in json file. I use Ext.data.JsonP but when I call it display Uncaught SyntaxError: Unexpected token : in browser.
I can’t use Ext.Ajax because it’s on another domain.
Here is code:

Ext.data.JsonP.request({
        url : 'myurl',


        success : function(result) {


            alert('success');
        },
        failure : function(result) {
            alert('failure');
        },
        callback : function(result) {
            alert('callback');
        }
    });

And this is expected result:

{"token":"MTAwNTI7V00yWkdVMFlqZDtkMDExZWU4YmU4ZTdlM2RjYzNkYzU3OThhYWViYjk4YmMxMzY2NTY2"}

Can somebody tell me what’s causing Unexpected token : error?
Or other way how to get response.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T04:16:47+00:00Added an answer on June 1, 2026 at 4:16 am

    Your response is not valid JSONP? JSONP is just a JavaScript function with a (JSON) object being passed to it:

    callback({"token": "..."});
    

    Ext.data.JsonP#request will automatically send a callback paramater; so your server just needs to read that and use that parameter as the callback function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make ajax call to get data for results nodes. In my
I want to make an ajax call, but I want to make sure it
Suppose I want to make an ajax call to the server and use the
When i want to use delegate class to make call while windows form working,
I make this call in my application.js file but it doesn't seem to return
I want to make an AJAX call before the user leaves the page (so
I want to make a call to some php file before that I'm trying
I want make simple call app. I use this code. Intent intent = new
I want to make a link call a Javascript function through the onclick event
I often want to make a multiline function call and reduce it down to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.