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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:53:41+00:00 2026-05-24T18:53:41+00:00

I am trying to do an AJAX call using JQuery, I actually have the

  • 0

I am trying to do an AJAX call using JQuery, I actually have the next code:

$('#form-check').click(function(){
        $.ajax({
            url: "http://www.domain.com/user/checkurl/",
            type: "GET",
            data: $(location).attr('pathname').substring(17) + "/" + $('#urlTxt').val(),
            error: function(){
                $('#urlTxt').css('background','#ce2b06');
            },
            success: function(data){
                $('#urlTxt').css('background','#83aa07');
                $('#form-check').css('display','none');
                $('#form-submit').css('display','block');
                $('#result').append(data);
            }
        });
    });

However when I check with Firebug I don’t get any response that I can see, I only see the message being sent and on status it says (200 – ok) but nothing gets sent back, and the Ajax call itself does the “success” clause, except that it doesn’t append the data. How can I check this? Or what am I missing?

  • 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-24T18:53:42+00:00Added an answer on May 24, 2026 at 6:53 pm

    This is a cross domain request. Browsers by default block responses from cross domain sites. You need to use jsonp as the datatype. Just google the same and you can see how it can be done using the jquery API. Stack overflow has questions around these too.

    Under the same origin policy, a web page served from server1.example.com cannot normally connect to or communicate with a server other than server1.example.com. An exception is the HTML element. Taking advantage of the open policy for elements, some pages use them to retrieve Javascript code that operates on dynamically-generated JSON-formatted data from other origins. This usage pattern is known as JSONP.

    also I am not sure about the way you are passing parameters to the server.. your data field should ideally resemble a json object like

    {
    id:"123",
    type:"student"
    }
    

    also you would ideally would wanna mention the type of response you are expected to receive so that jquery can process it correctly.

    This is done by setting the dataType option

    dataType: “json” // can be html, xml etc

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

Sidebar

Related Questions

I have created an IHttpAsyncHandler that I'm trying to call using AJAX, with jQuery.
I am trying to pass a dataString to to an ajax call using JQuery.
I trying to make my first AJAX with JSON call using jQuery and CodeIgniter.
I am trying to perform a nested AJAX call using the following code. The
I've built a page using jQuery that uses an async Ajax call. I'm trying
Im using jquery to call a page via ajax. I have some jquery functions
I have a simple ajax call: $.ajax({url: my_url_here, dataType: 'text', success: function(data, textStatus) {
I am trying to load images through ajax call in jquery using This here
Am I missing something? I'm trying to do a simple ajax call using jquery
So I am trying to use jQuery to insert data from an ajax call.

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.