views:

268

answers:

1

Hi,

I'm integrating Fullcalendar into my app. Consider a manager interface where he can select an employee and then view this employee's calendar. Now basically I'm using the following jquery code in my view:

<script type="text/javascript">
   $(document).ready(function() {
       $("#calendar").fullCalendar({
           defaultView: 'agendaWeek',
           isRTL: true,
           axisFormat: 'HH:mm',
           editable: true,
           events: "/Scheduler/CalendarData"
       });
   });  
</script>

Now I would like to have the controller function assigned to the events to retrieve the specific user selected by the manager:

events: "/Scheduler/CalendarData/<current_user_name>

Is there any way to retrieve the selected employee user name from the view (or rather pass it to the view from the controler) and then pass it onto the bound events function?

I hope I was clear enough...

Thanks in Advance, Eran

A: 

Use jquery ajax and call web Method...something like this:

        $.ajax({
  type: "POST",
  url: "Scheduler.aspx/GuardarEvento",
  data: "{'SfechaIni':'" + dt_i + "','SfechaFin':'" + dt_f + "'}",
  contentType: "application/json; charset=utf-8",
  dataType: "json",
  success: function(doc) {
             alert(doc.d);
                         }
     });
Francisco Martinez