天天看点

<AppML> Customers - 完整的应用程序

Customer City Country Orders
<AppML> Customers - 完整的应用程序
#CustomerName# #City# #Country#
Date Salesperson Shipper
#OrderDate# #Salesperson# #ShipperName#

源代码

HTML 源代码

<html>

<body>

<h1>Customers</h1>

<div

id="Form01"></div>

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

id="Orders01"></div>

<table id="Template01" class="appmltable"

style="width:100%;display:none">

<tr>

<th></th>

<th>Customer</th>

<th>City</th>

<th>Country</th>

<th>Orders</th>

</tr>

<tr

id="appml_row">

<td style="cursor:pointer"

onclick='customerForm.run("Form01","","#CustomerID#")'>

<img

src="Images/appmlPlus.png"></td>

<td>#CustomerName#</td>

<td>#City#</td>

<td>#Country#</td>

<td><a href=''

onclick='openOrders(#CustomerID#);return false;'>Orders</a></td>

</table>

<table id="Template02" class="appmltable"

<th>Date</th>

<th>Salesperson</th>

<th>Shipper</th>

<td>#OrderDate#</td>

<td>#Salesperson#</td>

<td>#ShipperName#</td>

</table>

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

<script>

var customers,customerForm,orders;

customers=new

AppML("appml.php","Models/Customers");

customers.run("List01","Template01");

customerForm=new

customerForm.displayType="form";

function openOrders(id)

{

orders=new

AppML("appml.php","Models/Orders");

orders.commands=false;

orders.setQuery("orders.customerid",id);

orders.run("Orders01","Template02");

}

</script>

</body>

</html>