Tableau d’information

Dans cet exemple, le groupe de produits Cartes nationales 1:50 000 est intégré. Le formatage se fait directement en code HTML.

Le modèle de format utilisé
var formatTemplate =
   '<tr style="border-bottom: 1px solid black;">' +
      '<td>[product.mapNumber]</td>' +
      '<td>[product.titleDe]</td>' +
      '<td>[product.descriptionDe]</td>' +
      '<td>[product.price]</td>' +
      '<td>[product.releaseDate]</td>' +
   '</tr>';
   

L’appel de la fonction Javascript
window.onload=getProducts(1.0, formatTemplate, ['17'],null);  
Nouveau code dès le 1er janvier 2017 window.onload=getProducts(2.0, formatTemplate, ['17'],null);

Le tableau des produits
<table style="border: 1px solid black; border-collapse: collapse;" width="100%">
   <thead style="border-bottom: 2px solid black; font-size: 0.8em; 
   background-color: silver; text-align: left;">
   <tr>
      <th>Karten-Nr.</th>
      <th>Name</th>
      <th>Beschreibung</th>
      <th>Preis</th>
      <th>Erscheinungsdatum</th>  
    </tr>
   </thead>
   <tbody id="productOutputContainer"></tbody>
</table>	
   

Et voilà à quoi ça ressemble