iTP Active Transaction Pages (iTP ATP) Programmer's Guide

ATP Web Page and Script Structure
iTP Active Transaction Pages (iTP ATP) Programmer’s Guide522292-002
3-5
Using NonStop SQL from JavaScript
In Example 3-3 on page 3-6, the body of the script begins by including several files that
define required functions. The tag <SERVER> shows where the server-side JavaScript
begins. The script checks security each time the page is loaded because the execution of
any script is context free: ATP does not implement the concept of a session.
Example 3-2. NonStop SQL Definitions and Includes
<!DOCTYPE HTML PUBLIC "-//SoftQuad//DTD HTML 3.2 + extensions
for HoTMetaL PRO
3.0(U) 19961211//EN" "hmpro3.dtd">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html">
<TITLE>Name and Address Change</TITLE>
<!--------------------------------------------------------->
<script language="JavaScript">
//Client side validation script functions (it's all JavaScript!)
function ValidateLastName (t) {
if (t.value=="") {
alert ("Please enter Last Name")
return false
}
return true
}
function ValidateFirstName (t) {
if (t.value=="") {
alert ("Please enter First Name")
return false
}
return true
}