<head><title>helloworld.html</title>
<script src=../window.js></script>
<script src=../examples.js></script>
</head>
<body>

<script>
//Note that all application scripts have to be INSIDE <body>

//initialize window
w = new win(100,100,400,400,"Hello World")

//set persistent variables, MSURL and MSMAP are defined in example.js;
//they should point to the MapServer executable and examples Mapfile
w.setServerURL(MSURL)
w.setVar("map",MSMAP)

//function to submit when pushing button or resizing
function submitWin() {
    //set map size equal to actual window size
    w.setVar("mapsize",w.contentWidth + " " + w.contentHeight)
    w.submit()
}

//execute this function every time the window is resized
w.setExecOnResize(submitWin)

</script>

<!-- and execute it when clicking the button -->
<input type=button value="Click!" onclick="submitWin()">
</body>

<!-- That's All Folks -->