[mapserver-users] mapserver+javascript without template example?!!!

Alan Boudreault aboudreault at mapgears.com
Sun Sep 9 18:28:27 PDT 2012


You should verify what exact request is sent to the server... I would 
assume something like "map=[map]" is sent. Use Firebug of any other 
debugging tool.

Alan

On 12-09-09 01:54 PM, Saka Royban wrote:
> Hi all.
> I'm just looking for some examples of using javascript with mapserver
> without using html templates.
> I know that there are some libraries around like OpenLayers, but i wanna
> see what happens in background first and then move to use these libraries.
> This is what i have written which does not works: (i get a error saying
> MS_DEFAULT_MAPFILE_PATTERN validation failed )
> <html>
> <head>
> </head>
>      <script language="JavaScript">
>          function zoom(){
>          document.forms['mapserv'].imgxy.value = "400 200";
>          document.forms['mapserv'].zoom.value = 2;
>          document.forms['mapserv'].submit();
>
>          }
>      </script>
> <body>
> <h1> A Dynamic Map </h1>
> <p></p>
> <h3> use form to make map dynamic + scripting </h3>
>      <form name="mapserv" method="GET" action="/cgi-bin/mapserv.exe">
>          <input type="hidden" name="imgxy" value="400 200">
>          <input type="hidden" name="map" value="[map]" />
>      <input type="hidden" name="imgext" value="[mapext]" />
>          <input type="hidden" name="imgxy" value="[center]" />
>          <input type="hidden" name="zoomsize" value="2" />
>
>          <input type="image" name="img"
> src="http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/ms101/htdocs/ms101.map&layers=all&mode=map"
> onclick="zoom()"/>
>
>      </form>
>
> </body>
>
> Thanks in advance
> <html>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


-- 
Alan Boudreault
http://www.mapgears.com/



More information about the MapServer-users mailing list