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

  • Home
  • SEARCH
  • 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 4047338
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:40:41+00:00 2026-05-20T13:40:41+00:00

Today on a website I was working on I changed the version of jQuery

  • 0

Today on a website I was working on I changed the version of jQuery from 1.4 to 1.5.1, however this caused a function which relies on the getJson function to stop working, I have looked at the API and as the request is a getRequest I assumed it was backwards compatible.

Here is the code:

function EmailAutoComplete(firstName, lastName, target) {
    // Query /AutoComplete/Email?FirstName=&LastName= for an e-mail
    // list and populate the select box target with the results.
    $.getJSON('@Url.Action("AutoComplete", "Email")', {
        FirstName: firstName,
        LastName: lastName
    }, function(matchingEmails) {
        var oldVal = target.val();
        target.empty();
        if (matchingEmails == null || matchingEmails.length == 0) {
            target.append('<option value="">E-mail address not found</option>');
        } else {
            $.each(matchingEmails, function(key, val) {
                var selected = (val == oldVal) ? 'selected="selected"' : '';
                target.append('<option value="' + val + '" ' + selected + '>' + val + '</option>');
            });

            if (matchingEmails.length > 1) {
                target.addClass("multipleEmailsAvailable");
            } else {
                target.removeClass("multipleEmailsAvailable");
            }
        }
    });
}

Has anyone else had an issue like this?

Thanks,
Alex.

  • 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-20T13:40:42+00:00Added an answer on May 20, 2026 at 1:40 pm

    Try Using $.ajax() instead and assign dataType: "text json"

    As of jQuery 1.5, jQuery can convert a
    dataType from what it received in the
    Content-Type header to what you
    require. For example, if you want a
    text response to be treated as XML,
    use “text xml” for the dataType. You
    can also make a JSONP request, have it
    received as text, and interpreted by
    jQuery as XML: “jsonp text xml.”
    Similarly, a shorthand string such as
    “jsonp xml” will first attempt to
    convert from jsonp to xml, and,
    failing that, convert from jsonp to
    text, and then from text to xml.

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

Sidebar

Related Questions

This is pasted from a website, which presumably was working. I did some googling
I am designing a website utilizing CI and jquery. I have today been working
I have a wordpress website which suddenly stopped working today. When I look at
I'm embedding dates from google calendar into a website, and it's all working, with
I am working on a large website built over Croogo in CakePHP. Today, without
So I have an old website which uses an older version of smarty, as
Today, I tried to post a link from my website on my wall, but
today I'm trying to optimize my website for a better rendering in firefox! my
My dad called me today and said people going to his website were getting
I am using today's timetable plugin on my website. Problem is, starting time is

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.