<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Richard,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Try putting something like this inside your
form:</FONT></DIV>
<DIV><FONT size=2><FONT face=Arial></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT face=Arial><SELECT NAME='map_size'
ID='mapsize'><BR><OPTION VALUE="600+300">600 x 300<BR><OPTION
VALUE="800+400">800 x 400<BR></SELECT></FONT></DIV>
<DIV>
<P><FONT face=Arial>Then have a bit of javascript like this:</FONT></P>
<P><FONT face=Arial></FONT><FONT face=Arial><BR><script><BR>function
onLoadFunction ()<BR>{ </P>
<P>urlstring = location.href;<BR> if (urlstring.match("600+300") !=
null)<BR> {<BR> document.forms[0].map_size.value =
"600+300";<BR> }<BR> else<BR>
{<BR> if (urlstring.match("800+400") !=
null)<BR> {<BR>
document.forms[0].map_size.value = "800+400";<BR>
}<BR> }</P>
<P>}<BR></script></FONT></P>
<P><FONT face=Arial>Make sure the body has something like:</FONT></P>
<P><FONT
face=Arial>
<body onload="onloadFunction()"></FONT></P>
<P><FONT face=Arial>I have not really tested this code, but it should work. It
basically puts in a dropdown selector for the mapsize form variable. When the
page is loaded, the javascript checks out the URL, searching for the value of
the map_size. Make sure there are no other form variables with similar values,
because it might pick those up too. It sets the dropdown box to the value it
found in the URL.</FONT></P>
<P><FONT face=Arial>Let me know if you have any troubles.</FONT></P>
<P><FONT face=Arial>Jacob</FONT></P>
<P><FONT face=Arial></FONT></FONT> </P></DIV>
<DIV><FONT face=Arial size=2>-----Original Message-----<BR>From: UMN MapServer
Users List [mailto:MAPSERVER-USERS@LISTS.UMN.EDU] On Behalf Of Richard A.
Milewski<BR>Sent: 11 March 2005 13:29<BR>To: <A
href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</A><BR>Subject:
Re: [UMN_MAPSERVER-USERS] Controlling mapsize in CGI</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Stephen,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thank you for the speedy reply! I don't have
any trouble setting the size<BR>in the querystring, that works reliably.
The problem is in showing a<BR>checkbox or the default value in a drop-down box
that shows the current<BR>setting. How do I handle the problem on the cgi/html
side.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thanks!</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>-- Richard<BR></FONT></DIV></BODY></HTML>