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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:58:23+00:00 2026-06-12T07:58:23+00:00

This is the code I am using to get the JSON response from PHP:

  • 0

This is the code I am using to get the JSON response from PHP:

(function() {

var bar = $('.bar');
var percent = $('.percent');
var status = $('#status');

$('#image-upload-form').ajaxForm({
    dataType: null,
    beforeSend: function() {
        status.empty();
        var percentVal = '0%';
        bar.width(percentVal)
        percent.html(percentVal);
    },
    uploadProgress: function(event, position, total, percentComplete) {
        var percentVal = percentComplete + '%';
        bar.width(percentVal)
        percent.html(percentVal);
        //console.log(percentVal, position, total);
    },
    complete: function(xhr) {
        status.html(xhr.responseText);
        var responseJSON = $.parseJSON(xhr.responseText);
        //var responseJSON = eval('('+xhr.responseText+')');

        /*var DOMElement = $(".progress-block-template").clone();
        var pagename = typeof($("#pagename").attr('value')=='undefined')?'':$("#pagename").attr('value');
        processingData(responseJSON,DOMElement,pagename);*/
    }
}); 

})();

And here is the response getting while printing using .html().

{
    "data": {
        "thumb_location": "http://XXXX.com/private/U/367/catalog/3/16285/thumbs/220x220.jpg?Expires=1349242125&Key-Pair-Id=APKAIGM4K33RYJKUHOXA&Signature=ptphhyF2GL6xe7xeosrzfKkpsXm7fWQAapcF3rjsZMuTwSCMhj2SZDIKtKGZ35-OJjTJ1LXu7wGEQlQvdKrBqT2oiOcPtL7etgTzRLe4~ub3KF64HhkglKv4DgzAWfvG5v8rNfmFvSja3HQ4K8m2o3h0Tl1uv7Lbwpqq0p71L5M_",
        "user_id": "367",
        "category_id": "3",
        "category_type": "worksample",
        "asset_id": 16285,
        "project_id": null,
        "file_name": "Chrysanthemum_37726.jpg",
        "size": 879394
    },
    "success": "true"
}

But if I do $.parseJSON or eval to parse the JSON response, it terminates the execution there itself. This is happening only in IE and it is working properly in FF and Chrome.

  • 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-12T07:58:25+00:00Added an answer on June 12, 2026 at 7:58 am

    the datatype should be json

     dataType: "json",
    

    in IE this cause problem when you don’t specify the dataType.

    and also try to change application/json; charset=utf8 to just plain application/json.

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

Sidebar

Related Questions

i have this simple code to load data from other php page using get
I'm using this code: <script> $(document).ready(function () { $.getJSON(http://twitter.com/statuses/user_timeline/USERNAME.json?callback=?, function(data) { $(.show_tweet).html(data[0].text); }); });
When using this code: <script> $(document).ready(function () { $.getJSON(http://twitter.com/statuses/user_timeline/USERNAME.json?callback=?, function(data) { if(data[0].text.length > 107)
I am using this code to get the background image of a div .
I am currently using this code to get data from a URL: NSURL *url
Edit This is the function where I get the response from $(document).ready(function() { $.ajax({
I'm trying to write this code using mostly arrays. I'm trying to get Correct
I'm using this code to get the contact list and then I want to
I'm using this code to get a drawable and use in a SetCompoundDrawablesWithIntrinsicBounds call:
I'm using this code for get all news: List<aspnet_News> allNews = context.aspnet_News.OrderByDescending(i => i.NewsId).ToList();

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.