I have configured Calendar module for event listing, I have a mini calendar block that when clicked should load the events views without refreshing the page.

$("#block-views-calendar-block-1 .mini.has-events a").click(function(e){
          href = $(this).attr('href');
          url: Drupal.settings.basePath + 'mymodule/'  + 'load-content' + href,
          type: 'GET',
          //data: data,
          dataType: 'json',
          success: function(response) {
          error: function() {
           // show error in any DOM.

I am using views_embed_view function and returning output as json but I get 500 server error.

Any idea how can I achieve this?


| improve this question | | | | |
  • I'm not sure this is a Drupal question, but have you confirmed that the value at (Drupal.settings.basePath + 'mymodule/' + 'load-content' + href) is valid? – calebtr Dec 24 '14 at 9:00
  • Are you still looking for answer :) ? – Ali Nouman Dec 24 '14 at 14:17
  • 1
    No, I figured it out yesterday. There was some issue with my views and further I replaced type from json to html – Shabir A. Dec 24 '14 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.