serverFrame.setExecOnReturn()
function func(s) {
// copy returned items in s (i.e. sf1 or sf2, dependant on which
// serverframe called the function) to visible locations
}
sf1.setExecOnReturn(func)
sf2.setExecOnReturn(func)
This method is the heart of Mapclient.It specifies the JavaScript function
that will be executed every time a WebServer puts something in the
serverFrame. A WebServer cannot put anything in single elements of a
browser page; it always completely replaces the target page, frame or iframe.
That is why MapClient places everything that comes back from a server
in an invisible iframe within a serverFrame. The "onReturn()"
method copies this to the actual visible locations. As a rule of thumb,
a serverFrame should contain no more than one form with
hidden variables, or a single HTML element, like a table. Complex
SPAN elements with subdivisions that form separate entities on the
Web page can also be put to great effect in a serverFrame.
The parameter to "setExecOnReturn()" is a JavaScript function that
should already exist when this method is called. This function is
automatically called with one parmeter: the serverFrame that actually
called the function when a server request returned to it. That
way generic functions can be written for different serverFrames.
See the User's Guide 4.1 and 4.2 for this important concept.