domain
This global variable has only to be set when MapClient calls MapServer from a
different server. Normally, iframes from different
servers can not read each other's internal HTML documents, they can
only display them. This security item is called the
.
There are several ways in which this security mechanism can be loosened
(see User's Guide 5.4). One of the simplest is to give
reciprocal access to
a limited subset of servers: those with the same domain suffix.
If each page from these servers includes the JavaScript statement:
document.domain="subdomain.subdomain.domain"
all pages from servers with addresses ending on that string can reach
each other's pages. On a Beowulf cluster with nodes named
"e1.yellow.sara.nl" to "e40.yellow.sara.nl", specifying "yellow.sara.nl"
in each HTML page makes these pages readable from whatever server they
are coming.
In MapClient, you can change the variable "domain" at the top of
"window.js". When this variable is set, "document.domain" will be adapted
in all necessary places. In all template files "document.domain" has also to
be specified.
Note for IE users: In IE "document.domain" cannot be set for an iframe
by the script that creates the iframe. Instead the "document.domain"
definition has to be read explicitly from an HTML file that physically
resides on hard disk. This means that in IE you have to define next to
the "domain" variable also the "domainsrc" variable, with the name
of that HTML file. This file contains the same domain information,
e.g. for a domain called "yellow.sara.nl" the domainsrc would
be:
<script>
document.domain="yellow.sara.nl>
<script>