jquery get or post methods for drupal block module Is it possible to use jquery get or post methods to fetch data dynamic in a a drupal7.x block module. I am a newbie to drupal.

Here is my event_calendar.module file

      function event_calendar_help($path, $arg)
      {
          switch ($path) 
          {
          case "admin/help#event_calendar":
          return '&lt;p&gt;'.  t("A block module that creates events and lists them in a event calendar") .'&lt;/p&gt;';
      break;
          }
    }
     /**
    * Implements hook_block_info().
    */
    function event_calendar_block_info() {
      $blocks['event_calendar'] = array(
        'info' =&gt; t('Event calendar'), 
        'cache' =&gt; DRUPAL_CACHE_PER_ROLE, //Default
      );
      return $blocks;
    }

    /**
    * Implements hook_block_view().
    *
    * Prepares the contents of the block.
    */
    function event_calendar_block_view($delta = '') 
    {
      switch($delta)
      {
        case 'event_calendar':
          $block['subject'] = NULL;
          if(user_access('access content'))
           {
            $items = array();        
            $basepath = drupal_get_path('module', 'event_calendar');
            $markup = '&lt;div id="content"&gt;
                    &lt;div style="float:right;margin-bottom:5px"&gt;
                        &lt;label style="float:left;padding:3px;"&gt;Week :&lt;/label&gt;
                        &lt;div id="date_picker"&gt;
                            &lt;span id="startDate"&gt;&lt;/span&gt;&lt;/span&gt; - &lt;span id="endDate"&gt;&lt;/span&gt;
                            &lt;div class="week-picker" style="display:none;position:absolute"&gt;&lt;/div&gt;   
                        &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;hr style="clear:both;"/&gt;
                    &lt;div id="calender_content"&gt;

                    &lt;/div&gt;
                    &lt;div id="color_code" style="float:right"&gt;
                        &lt;div class="lane1 colorbox"&gt;&lt;/div&gt;&lt;div style="float:left"&gt;Lane 1&lt;/div&gt;
                        &lt;div class="lane2 colorbox"&gt;&lt;/div&gt;&lt;div style="float:left"&gt;Lane 2&lt;/div&gt;
                        &lt;div class="lane3 colorbox"&gt;&lt;/div&gt;&lt;div style="float:left"&gt;Lane 3&lt;/div&gt;
                        &lt;div class="lane4 colorbox"&gt;&lt;/div&gt;&lt;div style="float:left"&gt;Lane 4&lt;/div&gt;
                    &lt;/div&gt;
                &lt;/div&gt;';
      $block['content'] = array(
        '#markup'   =&gt; $markup,
        '#attached' =&gt; array
            (
            'css' =&gt; array($basepath . '/css/event_calendar.css',$basepath . '/css/smoothness/jquery-ui-1.8.16.custom.css'),
            'js'  =&gt; array($basepath . '/javascript/event_calendar.js',$basepath . '/javascript//jquery-ui-1.8.16.custom.min.js'),
            ),
        );

          }
return $block;
      }

    } 


I want to know how to write functions inside above .module file to access some content dynamically through jquery get or post method?

Or should I use something like 'hook_menu' other than block?
For using get data by jquery ajax you need first seta menu link for listen to your ajax requst, and in callback of your menu you passed back a block or any data you want.

function yourmodule_menu () {
   $items=array();
   $items['youruniqepath'] =array(
        'title' =&gt; 'my menu',
        'description' =&gt; 'A menu link to handle ajax request',
        'page callback' =&gt; 'yourhandlerfunction',
        'access callback' =&gt; TRUE, //you can set it with your permission
      );
   return $items;
   }


and in yourhalderjust need pass a block :

function yourhandlerfunction () {
  //with any method you want get your block,
  // I suggest something like this
    $block = module_invoke('module_name', 'block_view', 'block_delta');
    print render($block);
}


and in your clientside get it with something like this

$.ajax({
    type: "POST",
    url: 'youruniqepath',
    //data: {}, you can also pass block name and act more dynamicly
    success: function (data){
        $('#yourplace').html(data);
    }
});