Clients de cas AppML




< td>#Ville#

源代码

HTML 源代码

<html>
<body>

<h1>Clients</h1>

<div id="Form01"></div>
<div id="List01"></div><br>
<div id="Commandes01"></div>

<table id="Template01" class="appmltable" style="width:100%;display:none">
<tr>
<th></th>
<th>Client</th>
<th>Ville</th>
<th>Pays</th>
<th>Commandes</th>
</tr>
<tr id="appml_row">
<td style="cursor:pointer" onclick='customerForm.run("Form01","","#CustomerID#")'>
<img src="../style/images/appmlPlus.png"></td>
<td>#CustomerName#</td>
<td>#Ville#</td>
<td>#Pays#</td>
<td><a href='' onclick='openOrders(#CustomerID#);return false;'>Commandes</a></td>
</tr>
</table>

<table id="Template02" class="appmltable" style="width:100%;display:none">
<tr>
<th>Client</th>
<th>Date</th>
<th>Vendeur</th>
<th>Expéditeur</th>
</tr>
<tr id="appml_row">
<td>#CustomerName#</td>
<td>#OrderDate#</td>
<td>#Vendeur#</td>
<td>#ShipperName#</td>
</tr>
</table>

<script src="appml.js"></script>

<script>
var clients,customerForm,commandes;
clients=nouveau AppML("appml.php","Modèles/Clients");
clients.run("List01","Template01");
customerForm=new AppML("appml.php","Modèles/Clients");
customerForm.displayType="form";
function openOrders(id)
{
orders=new AppML("appml.php","Modèles/Commandes");
orders.commands=false;
commandes.setQuery("commandes.customerid",id);
commandes.run("Orders01","Template02");
}
</script>

</body>
</html>