[Gambas-user] Timer for the class Webpage

Hans Lehmann hans at gambas-buch.de
Thu Jul 21 18:05:20 CEST 2022


Hello.

We are currently developing websites based on the Webpage (gb.web) 
class. The (template) website consists of 5 sections: Head, Header, 
Navigation, Content and Footer. The first three sections and the footer 
are the same for all created web pages. Depending on the navigation, 
suitable content (type webpage) is included in the content section:

<!-- BEGIN CONTENT -->
   <% Select Case Request.Query
         Case "Environment" %>
        <<IncEnvironment>>
      <% Case "DBReport" %>
        <<IncDBReport>>
      <% Case "Multimedia" %>
        <<IncMultimedia>>
      <% Case "Formular" %>
        <<IncFormular>>
      <% Case "Impressum" %>
        <<IncImpressum>>
      <% Default %>
        <<IncHome>>
   <% End Select %>
<!-- END CONTENT -->

This now works excellently, also after support from Lee.

Here is an example that describes the task to be solved, which is a 
problem for us:

The content of a web page to be included, in which a database report is 
displayed, consists of only one line:

<%InsertDBTable()%>.

The procedure 'InsertDBTable()' in the class IncDBReport.class queries 
an (SQLite) database table, prepares the data for the report and 
generates an HTML table with the selected data, which is displayed in 
the web browser.

The data in the DB table changes constantly.

A solution is sought for the task of changing, updating the table in the 
web page at a fixed interval. Since there is no timer for web 
applications based on the class Webpage (gb.web), we are grateful for 
any advice on how to realise and use such a timer. To put it a bit 
bluntly: without a timer, the class Webpage is nothing half and nothing 
whole.

With kind regards

Hans


More information about the User mailing list