Introduction

ServerFrames are really the heart of Mapclient: they take care of all interaction between server and browser. Actually, they are quite simple: just an invisible iframe, with one form consisting solely of hidden variables. These can be set and submitted to a WebServer via the custom methods of the ServerFrame. A simple serverFrame would be created as:
s = new serverFrame()
s.setServerURL(url)
s.setVar(name1,value1)
...
s.submit()
A serverFrame has to use the "setTarget()" method to specify a second serverFrame as the receiver of the results from the WebServer. Of course this second serverFrame will be invisible too, so the results have to be copied to visible locations by the onReturn function of the second serverFrame. This function is specified by the serverFrame method "setExecOnReturn()". Windows are just collections of serverFrames plus one visible iframe to display the results, a title bar and buttons. Win methods like "setVar()" actually call methods of the same name from their first serverFrame.

ServerFrames may seem a very roundabout way to get something from a WebServer into a browser, but they have two very great advantages: This way, browser-server programming is much more like conventional application programming, with computation and display completely separated.