[mapserver-users] passing arrays betn. php and javascript

Puneet Kishor pkishor at GeoAnalytics.com
Fri Apr 26 15:20:03 EDT 2002


you html code looks like so...

<input name="arLayers[]" type="checkbox" value="pistachio" checked>
<input name="arLayers[]" type="checkbox" value="hazelnuts">
<input name="arLayers[]" type="checkbox" value="honey" checked>
<input name="arLayers[]" type="checkbox" value="phyllo">


(sorry, I just ate baklava at Husnu's)


your php code automatically gets $arLayers with the checked layers as its
elements that you can loop through.

have fun.

pk/


 
> -----Original Message-----
> From: Pushkar Pradhan [mailto:pushkar at ERC.MsState.Edu]
> Sent: Friday, April 26, 2002 12:02 PM
> To: mapserver-users at lists.gis.umn.edu
> Subject: [mapserver-users] passing arrays betn. php and javascript
> 
> 
> Hi,
> In my maps I want to do the foll.:
> The user should be able to select the layers to display and change the
> order of the drawing.
> I think the fastest way is to do this using javascript, since 
> it runs on
> client side it will be fast.
> So is it possible to pass an array containing the names of 
> the layers from
> php to javascript, after changing the element positions in JS 
> have it back
> in php? Some code snippets would also be appreciated. Thanks,
> 
> -Pushkar S. Pradhan
> 



More information about the mapserver-users mailing list