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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:43:27+00:00 2026-05-30T06:43:27+00:00

I am calling AJAX by jQuery to the script on the same domain, everything

  • 0

I am calling AJAX by jQuery to the script on the same domain, everything is successful, data are in the database etc, but AJAX still gives me back error. I tried to do output in JSON, didn’t help. It was working just fine yesterday, but it’s not working now.

$.ajax({
        url: "http://www.thirst4water.org/api/?request=sign_petition"+query_string,
        success: function(data){   // Ajax successfull
            alert('Request successful and id is'+data);
            // Hide loader
            $('.join-us .loader').hide();  

            // If return is numeric we have id, if not we have error
            if (isNumber(data)){
                window.userId = data;   // Save gobally new user id
                $('.join-us').fadeOut();    // Hide the Signing form        

                // If we have userPic that means user came from facebook, and can skip uploading of picture     
                if(window.userPic){
                    // Store avatar from facebook
                    tomUploadAvatar(window.userPic);

                    // Switch the steps
                    $('#step2').fadeOut('normal',function(){
                        $('#step3').fadeIn();  // Let's see the final step 
                    });

                    // And re-load the dragon
                    tomReloadDragonPerson(window.userId);                                                                                                               
                } else {
                    $('.join-us').fadeOut('normal',function(){  // Hide the Signing form
                        $('#step2').fadeIn();   // In case we didnt come from facebook we show uploading form
                    });                 
                }
            } else {
                $('.join-us .actions').html(data);
            }
        },
        error: function(value1,value2,value3){
            alert(JSON.stringify(value1)+JSON.stringify(value2)+JSON.stringify(value3));
        },
    });
    return false;
});

The PHP script is fine, if I just open the address everything works fine.

  • 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-30T06:43:28+00:00Added an answer on May 30, 2026 at 6:43 am

    Try changing this

    url: "http://www.thirst4water.org/api/?request=sign_petition"+query_string,
    success: function(data){   // Ajax successfull
    

    to this

    url: "http://www.thirst4water.org/api/?request=sign_petition"+query_string,
    dataType: "json",
    success: function(data){   // Ajax successfull
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am calling a service that return JSON data. Script: $.ajax({ type: "POST", url:
I have an ajax call to one php script via jquery but it takes
Using the following JQuery/AJAX function I'm calling a partial view when an option is
I am calling a .txt file from a jquery ajax call. It has some
i'm trying to submit my Ajax form using jQuery. However calling the submit() function
Calling the ajax called URL works well without ajax eg. http://localhost/ci/controller/method/param_value . But using
I have the following code: @section ftr_scripts { <script src=//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js type=text/javascript></script> } Under the
So here is my problem. I'm using Jquery's $.ajax to pass back a series
I have a script that calls a php page via jquery/ajax. The results would
I have an iframe using the jQuery 1.4.2 script. The same iframe is injected

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.