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 6019095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:22:16+00:00 2026-05-23T03:22:16+00:00

I simply need to get the ‘html’ from a particular (cross domain) request. I’m

  • 0

I simply need to get the ‘html’ from a particular (cross domain) request.

I’m using the JQuery.ajax() function passing dataType=json so that JQuery generates a script tag and fires off the request.
Here’s the code:

            var url="http://www.google.com/callback=?";
            $.ajax({
                type: 'GET',
                url: url,
                dataType: 'json',
                success: function(data) {$("#out").append("success "+data); },
                error: function(data) {$("#out").append("failure "+data); },
                complete: function(data) {$("#out").append("complete "+data); },
                data: {},
                async: false
            });

Now, the odd bit is that, using firebug, I do see the generated script tag AND the response from the remote server, but none of my callbacks are being called.
Jquery's script tag injection for cross domain calls

How do I get the html returned from the ajax() call? Am I using the wrong function in the first place?

  • 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-23T03:22:16+00:00Added an answer on May 23, 2026 at 3:22 am

    The callback isn’t called because the document returned is not a JavaScript application consisting of a function call to that callback.

    JSON-P works by running third party JS that calls a function on your page.

    You can’t use client side code to get content that isn’t expressed as JavaScript from a different origin.

    If you want to get such content then you need to proxy it through a server. Either one on the same origin (so you can get the content directly) or one that transforms it to JSON-P.

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

Sidebar

Related Questions

I need to get all the Django request headers. From what I've read, Django
I have a question: I simply need to get captions of all windows in
I need to get a list of customer who ordered a particular product for
I need to get a SQL query to output the date from a datetime
I need to do a few very simple URL manipulations in Java. Like get
I simply need to add floatArray1 to floatArray2 storing the result in floatArray2.. no
Simply I need to write echo t${count} = $t${count} To a text file, including
I need to simply go through all the cells in a Excel Spreadsheet and
I need to simply provide the content of a property to a custom User
I need to build a content gathering program that will simply read numbers on

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.