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

  • SEARCH
  • Home
  • 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 1075329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:15:25+00:00 2026-05-16T21:15:25+00:00

no matter what i do, i couldn’t get alert(test); to display an alert. for

  • 0

no matter what i do, i couldn’t get alert(“test”); to display an alert. for some reason this jsonp (although it fetches the data correctly: http://u.kodingen.com/1JsHcN ) never calls the success function.

if i copy and paste the example here: http://jqueryui.com/demos/autocomplete/#remote-jsonp it works beautifully. but my URL doesn’t.

any ideas?

        $("#venue_in").autocomplete({
        source: function(request, response) {
            $.ajax({
                url: "http://x.com/y.php",
                dataType: "jsonp",
                data: request,
                cache: false,                
                success: function(data) {
                    alert("test");
                    response(data);
                }
            })
        },
        minLength: 2,
    });
  • 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-05-16T21:15:25+00:00Added an answer on May 16, 2026 at 9:15 pm

    Your URL doesn’t seem to be returning valid JSONP. It’s not the same as JSON.

    if your regular JSON url (http://x.com/y.php) returns JSON like this:

    [{'label':'blah blah','value':3},{'label':'foo",'value':42}]
    

    then the same JSONP url would look something like this:

    `http://x.com/y.php?callback=myfunc`
    

    and it would return something like this:

    myfunc([{'label':'blah blah','value':3},{'label':'foo",'value':42}])
    

    Your url dosn’t appear to be including the ‘P’ part of JSONP.

    wikipedia’s page isn’t super-clear, but if you scroll down to the part on JSONP, and then read it carefully, it should make sense. (If anyone has a better reference than wikipedia, please post it).

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

Sidebar

Related Questions

Edit: I had some code posted here but I couldn't get it to reproduce.
Simple question, but for some reason I couldn't find the exact answer on Google:
I couldn't really find this in Rails documentation but it seems like 'mattr_accessor' is
This may be a matter of style, but there's a bit of a divide
As a matter of fact you have smth like /java/src and /java/test . But
This is a fairly trivial matter, but I'm curious to hear people's opinions on
I know this is a matter of style, hence the subjective tag. I have
I did some quick searching on the site and couldn't seem to find the
Apologies if this has been asked before (I couldn't find the answer anywhere), but
I was looking at some code I've inherited and I couldn't decided if I

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.