The WMS Viewer Sample Application
|
53
var contactOrganization = '<%= svi != null?
svi.getContactOrganization(): "" %>'
var contactAddress = '<%= svi != null?
svi.getContactAddress(): "" %>'
var contactCity = '<%= svi != null?
svi.getContactCity(): "" %>'
var contactState = '<%= svi != null?
svi.getContactState(): "" %>'
var contactTelephone = '<%= svi != null?
svi.getContactTelephone(): "" %>'
var contactEmail = '<%= svi != null?
svi.getContactEmail(): "" %>'
6
Create the
showContactInfo()
function anywhere in the JavaScript section.
This function opens the pop-up HTML page,
ContactInfo.html,
that dis-
plays the contact information.
function showContactInfo()
{
contactWindow = openWindow("../html/ContactInfo.html",
contactWindow,
"height=300, width=400,
scrollbars, resizable")
}
7
Create the page
ContactInfo.html
and place it in WMS Viewer’s
html
sub-
folder. This page must have seven fields—one for each piece of contact
information—belonging to a form named
ContactInfo
and named
name,
organization,
address,
city,
state,
telephone,
and
. These fields are for dis-
play purposes only, not user input.
8
On the
ContactInfo.html
page, add the JavaScript function
initContactInfo()
to fill the fields when the page initializes. Use the
opener
property to access
directly the contact-information variables declared in the main WMS
Viewer page.
9
On the
ContactInfo.html
page, use the <body> element’s
onload
event to
call
initContactInfo()
when the page initializes.
The code for the completed
ContactInfo.html
page follows:
<html>
<head>
<title>Contact Information</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script>