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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:13:10+00:00 2026-06-17T22:13:10+00:00

I have to implement some sort of live search in a project at the

  • 0

I have to implement some sort of live search in a project at the university. I have the following code:
MVC Action:

[Authorize]  
[AcceptVerbs(HttpVerbs.Get)]  
[InitializeSimpleMembership]
public JsonResult Search(string term)  
{  
    var data = ... // get matching item  
    return Json(data, JsonRequestBehavior.AllowGet);  
}  

Script in View:

$(document).ready(function() {  
    $("#searchText").keyup(function() {  
        $.getJSON('/Search/Search', { "term": $(this).val() },  function(result) {   
            alert(result);    
            $("#searchText").val(result.d);  
        });  
    });  
});

The controller action is called and returns the matching objects, but the javascript function is never called, no alert box, nothing. What can do to make this work?

  • 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-17T22:13:11+00:00Added an answer on June 17, 2026 at 10:13 pm

    There could be a problem with the JSON serialization of your data. This could often happen if you are attempting to directly serialize your EF domain models which might contain circular references, … The correct approach is of course to use view models.

    In order to track the problem use FireBug and look at the Network tab to see the exact request/response of the AJAX call. There you will be able to see the response returned by the server which will contain the error message.

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

Sidebar

Related Questions

I have found that I often have to implement some sort of a scheduler
I have to implement a few action. Each of they have some common elements,
I have some code that I absolutely must implement using goto . For example,
I'm trying to implement some sort of API on tornado and I have such
I have a small community website and I need to implement some sort of
I am working on a little project and want to implement some sort of
We're trying to implement some sort of Chess game and we have defined an
I have a little question about how to implement some sort of graphics editor.
I am trying to implement some sort of MVC in Java. Actually it's more
I have a website running now. I have to implement some logging routines as

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.