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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:39:24+00:00 2026-06-05T08:39:24+00:00

Using a unparseable cruft on my ajax responses. Works great, except IE7 which throws

  • 0

Using a unparseable cruft on my ajax responses.

Works great, except IE7 which throws a failure. Any thoughts on why the failure?

ajax call:

$.ajax({
        type: "POST",
         url: "js/zipcodeLookup.json", //mock json response
         contentType: "application/json",  
        dataType:"text json",
        data: "{postalcode: '" + $(myField).val() + "', country: '" + myCountry + "'}",
        success: function(data) {
            //do something here

        },
        error: function(){
        alert('failure');
      }

     });

ajax converter:

    $.ajaxSetup({ 
            converters: { "text json": function (stringData) { 
                        return JSON.parse(stringData.replace('for(;;);', '')); 
            } } 
}); 

and json:

for(;;);{
    "isError": "false",
    "city": "Springfield",
    "juris": "IL"
}

EDIT

and the correct answer is that I stupidly overlooked my parse method – use jQuery.parseJSON() instead!

  • 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-05T08:39:25+00:00Added an answer on June 5, 2026 at 8:39 am

    IE < 8 doesn’t have native support for JSON. Do you have any fallback mechanism for IE7?

    For browsers without native JSON support you should use this library

    You could implement a fallback mechanism like this

    <script>window.JSON|| 
        document.write("<script src='js/json2.js'>\x3C/script>")
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using MVC2 I have an AJAX form which is posting to a bound model.
Using MVVM. I have a DataTemplate which I am using to display an expander
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using Delphi 2010. I am looking for (possibly) a function or procedure which can
Using the C# Facebook SDK 5.0.3 everything works fine whit the client.Get(/me). But when
Using Rails 3.1. I have some pages that render same layout, except the contents
we are looking at using the unparseable curft approach to our json as an
Using SQL Server 2008. I have multiple Locations which each contain multiple Departments which
Using Eclipse, working with (ANSI) C language, is there any way to view the
Using MySQL should I store time data as an Int which would be the

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.