This case study demonstrates how to build a complete < AppML > Internet application with the ability to enumerate, edit, and search for information against several tables in the database. In this chapter, we will demonstrate how to add a HTML template to a HTML page. By skillfully using templates, you can easily add links between < AppML > list objects and < AppML > forms: By skillfully using templates, you can easily add links between < AppML > list objects and linked lists: Finally, with a small amount of code replication, we can complete the project. In the following sections, you can see more applications with complete source code.
In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress. 4.9.1. Add HTML template ¶
4.9.2. List customers ¶
HTML-View ¶
<h1>Customersh1>
<div id="List01">div><br>
<table id="Template01" class="appmltable" style="display:none">
<tr>
<th>Customerth>
<th>Cityth>
<th>Countryth>
tr>
<tr id="appml_row">
<td>#CustomerName#
<td>#City#
<td>#Country#
tr>
table>
<script src="appml.js">script>
<script>
var customers
customers=new AppML("appml.php","Models/Customers");
customers.run("List01","Template01");
script>
4.9.3. List customers and customer forms ¶
HTML-View ¶
<h1>Customersh1>
<div id="Form01">div><br>
<div id="List01">div><br>
<table id="Template01" class="appmltable"
style="width:100%;display:none">
<tr>
<th>th>
<th>Customerth>
<th>Cityth>
<th>Countryth>
tr>
<tr id="appml_row">
<td style="cursor:pointer" onclick="openForm('#CustomerID#')">
<img src="images/appmlFolder.png">td>
<td>#CustomerName#
<td>#City#
<td>#Country#
tr>
table>
<script src="appml.js">script>
<script>
var customers,customerForm;
customers=new AppML("appml.php","Models/Customers");
customers.run("List01","Template01");
function openForm(id)
{
customerForm=new AppML("appml.php","Models/Customers");
customerForm.displayType="form";
customerForm.run("Form01","",id);
}
script>
4.9.4. List customers and customer orders ¶
HTML-View ¶
<h1>Customersh1>
<div id="List01">div><br>
<div id="Orders01">div><br>
<table id="Template01" class="appmltable"
style="width:100%;display:none">
<tr>
<th>Customerth>
<th>Cityth>
<th>Countryth>
<th>th>
tr>
<tr id="appml_row">
<td>#CustomerName#
<td>#City#
<td>#Country#
<td><a href='' onclick='openOrders("#CustomerID#");return
false;'>Orders
tr>
table>
<table id="Template02" class="appmltable"
style="width:100%;display:none">
<tr>
<th>Customerth>
<th>Dateth>
<th>Salespersonth>
<th>Shipperth>
tr>
<tr id="appml_row">
<td>#CustomerName#
<td>#OrderDate#
<td>#Salesperson#
<td>#ShipperName#
tr>
table>
<script src="appml.js">script>
<script>
var customers,orders;
customers=new AppML("appml.php","Models/Customers");
customers.run("List01","Template01");
function openOrders(id)
{
orders=new AppML("appml.php","Models/Orders");
orders.setQuery("orders.customerid",id);
orders.commands=false;
orders.run("Orders01","Template02");
}
script>
4.9.5. Now put it all together. ¶
Customer lists, forms, and orders ¶
<h1>Customersh1>
<div id="List01">
<table id="appml_list" class="appmllist">
<tr>
<th>Customerth>
<th>Cityth>
<th>Countryth>
<th>th>
tr>
<tr id="appml_row">
<td>#CustomerName#
<td>#City#
<td>#Country#
<td><a href='' onclick='openOrders("#CustomerID#");return
false;'>Orders
tr>
table>
div>
<div id="List02">div>
<script src="appml.js">script>
<script>
var Customers,Orders
Customers=new AppML("appml.php","Models/Customers");
Customers.run("List01");
function openOrders(id)
{
var Orders=new AppML("appml.php","Models/Orders");
Orders.setQuery("orders.customerid",id);
Orders.commands=false;
Orders.run("List02");
}
script>
Principles, Technologies, and Methods of Geographic Information Systems
102