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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:45:25+00:00 2026-05-16T11:45:25+00:00

I’m using the Jquery full calendar plugin, and i want to be able to

  • 0

I’m using the Jquery full calendar plugin, and i want to be able to click on an event and the details of the event to be populated via AJAX into a div with the id of #details.

here is my controller action that i’m trying to load. When debugging, the action does not consider the incoming request to be AJAX and returns the full view instead of the partial. Does it matter if the full view is called the same as the partial view? Ie; ‘Details.aspx’ & ‘Details.ascx’?

public ActionResult Details(int id)
    {
        Pol_Event pol_Event = eventRepo.GetEvent(id);
        ViewData["EventTypes"] = et.GetEventType(id);
        if (pol_Event == null)
            return View("NotFound");
        else
        {
            if(HttpContext.Request.IsAjaxRequest()){
                return PartialView("Details");
            }
            else
                return View(pol_Event);

        }
    }

Here is the jquery code i’m using. Am i missing not using .load() correctly in the eventClick function? The Developer of the calendar plugin has confirmed that eventClick has nothing to do with AJAX so the fault must lie in my code.

$(document).ready(function() {
            $('#calendar').fullCalendar({

                header: {
                    left: 'prev,next today',
                    center: 'title',
                    right: 'month,agendaWeek,agendaDay'
                },

                events: "/Events/CalendarData",
                allDayDefault: false,

                selectable: true,
                eventClick: function(event) {
                    $('details').load(event.url);
                },
                eventRender: function(event, element) {
                    element.qtip({
                        content: event.title + " @ " + event.venue,

                        position: {
                            corner: {
                                target: 'topLeft',
                                tooltip: 'bottomLeft'
                            }
                        }

                    });
                }


            });

        });

So am i using the Jquery.Load() function incorrectly, or is there something wrong with my controller?

More updates: I finally caught the problem. The XMLHttpRequest is being sent but i’m encountering a 500 internal server error, not solved yet as i can’t figure out what’s causing the error.

Host: localhost:4296
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 
Firefox/3.6.8
Accept: text/html, */*
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
X-Requested-With: XMLHttpRequest
Referer: http://localhost:4296/Events/EventCalendar
Cookie: .ASPXAUTH=56C5F4FD536564FF684F3F00E9FB51A5F2F1B22D566C517923D71FEAF599D266531CAC52BF49D2700E048DD420A4575456855303CC2DCB5875D4E1AD8883821EA62E5169969503776C78EB3685DAA48C

UPDATE: I finally figured out what the problem was. I wasn’t passing in the model to the partial so the line

return PartialView("Details");

Should have been

return PartialView("Details", pol_Event);

this was generating the 500 internal service error.

  • 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-16T11:45:26+00:00Added an answer on May 16, 2026 at 11:45 am

    When you make an Ajax request you’re suppose to set the ‘X-Requested-With‘ HTTP header to something like ‘XMLHttpRequest‘ eg.

    Host                www.google.com
    User-Agent          Mozilla/5.0 (Windows; U; Windows NT 6.1; (snip...)
    Accept              */*
    Accept-Language     en-us,en;q=0.5
    Accept-Encoding     gzip,deflate
    Accept-Charset      ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive          115
    Connection          keep-alive
    X-Requested-With    XMLHttpRequest
    Referer             http://www.google.com
    

    This ‘X-Requested-With’ header is what the ‘IsAjaxRequest()’ method looks for. Normally, jQuery’s Ajax methods will send this header automatically. My guess is that for some reason the jQuery Calendar plugin isn’t sending this header.

    I would download something like fiddler, or install Firebug for Firefox and check the raw HTTP Request/Response data when the Ajax request/Calendar control is fired/initialised. See if the X-Requested-With header is being included.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.