Hi Anthony,

I would expect the ajaxSuccess handler to fire after each of the three Ajax 
> calls. Have you confirmed whether it is firing (e.g., maybe add an alert to 
> it to see if a message pops up)?


There were no Ajax calls at all. After adjusting calendar.html:

<script type="text/javascript">
$(document).ready(function(){
  $('a[href=#{{=tab}}]').tab('show');
});
</script>

<ul class="nav nav-tabs">
  {{if session.cal.lesrooster:}}
    <li><a data-toggle="tab" href="#tab-1" 
onclick={{="web2py_component('%s','tab-1')" 
%URL('site','classes.load',args=session.id)}}>Lessen</a></li>
  {{pass}}
  {{if session.cal.event_list:}}
    <li><a data-toggle="tab" href="#tab-2" 
onclick={{="web2py_component('%s','tab-2')" 
%URL('site','events.load',args=session.id)}}>Events</a></li>
  {{pass}}
  {{session.cal.cursusrooster}}
    <li><a data-toggle="tab" href="#tab-3" 
onclick={{="web2py_component('%s','tab-3')" 
%URL('site','courses.load',args=session.id)}}>Cursussen</a></li>
  {{pass}}
</ul>
 
<div class="tab-content">
  {{if session.cal.lesrooster:}}
    <div class="tab-pane" id="tab-1">
    </div> <!-- /tab-pane -->
  {{pass}}
  {{if session.cal.event_list:}}
    <div class="tab-pane" id="tab-2">
    </div> <!-- /tab-pane -->
  {{pass}}
  {{if session.cal.cursusrooster:}}
    <div class="tab-pane" id="tab-3">
    </div> <!-- /tab-pane -->
  {{pass}}
</div> <!-- /tab-content -->


 I do have Ajax calls the only problem is that this script: 


<script type="text/javascript">
$(document).ready(function(){
  $('a[href=#{{=tab}}]').tab('show');
});
</script>


Initially the tab-pane is empty, only after clicking one of the tabs the 
content loads. Which contents loads initially depends on whether there are 
classes, events and courses, so adding this to the tab-1 is no option:  
{{=LOAD('site','classes.load',args=session.id,ajax=True,target='tab-1')}}. 
Do you know how to solve this problem?


Kind regards,

Annet.

Reply via email to