I've read through the chapter and the web2py appliances but I'm failing to comprehend.Currently, I have managed to add the code below on the javascript section, and the div with an id of 'here' is where's the bootstrap panel.In the controller I have a calculate_cost function that returns something like this in the div Calculate Cost 200€ request stats
ajax('{{=URL('default','calculate_cost')}}',['month','year','name'],'here'); I have now idea why it shows like that and how can I plot the values I want individually in each of the td of the table. Also will I need to do an ajax request for each thing I want to calculate(like call duration,types of services,etc.) or I can do all in one? quarta-feira, 24 de Junho de 2015 às 11:39:39 UTC+1, Carla Raquel escreveu: > > > I'm having a bit of trouble figuring out how to add info to a bootstrap > table in a panel, through ajax.This's a phone call register system and I > have the following code in the html: > > resumoMensal.html > > <table class="table table-condensed table-striped" > style="border-collapse:collapse;"> > > <tbody> > <tr data-toggle="collapse" data-target="#demo3" > class="accordion-toggle"> > <td><button class="btn btn-default btn-xs"><span > class="glyphicon > glyphicon-eye-open"></span></button><htext2><b>  Extensions</b></htext2></td> > <td></td> > </tr> > <tr> > <td colspan="6" class="hiddenRow"><div class="accordian-body > collapse" id="demo3"> > <table class="table table-striped"> > <thead> > {{for x in extension:}} > > <tr><td></td><td><htext><b>{{=x.Extension}}</b></htext></td></tr> > {{pass}} > </thead> > </table> > </div> </td> > </tr> > > > <tr data-toggle="collapse" data-target="#demo1" > class="accordion-toggle"> > <td><button class="btn btn-default btn-xs"><span class="glyphicon > glyphicon-eye-open"></span></button><htext2><b>  Total > Cost</b></htext2></td> > {{if total_cost["_extra"]["SUM(Call.Cost)"]!=None:}} > > <td><htext2><b>€{{=total_cost["_extra"]["SUM(Call.Cost)"]}}</b></htext2></td> > {{else:}} > <td><htext2><b>€0</b></htext2></td> > {{pass}} > > </tr> > <tr> > <td colspan="6" class="hiddenRow"><div class="accordian-body > collapse" id="demo1"> > <table class="table table-striped"> > <thead> > {{for x in cost_types:}} > > <tr><td></td><td></td><td><htext><b>{{=x["Call"]["Type_service"]}}</b></htext></td>< > > ... -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.