It ain't pretty but it works

Steve Lime Steve.Lime at DNR.STATE.MN.US
Thu Aug 10 14:07:15 EDT 2006


You've got the values you need in the select list so why not just do:

function ChangeMonth()  {
  var mon =
document.Month.Months.options[document.Month.Months.selectedIndex].value;

  WindRoseWindow=window.open("",
"WindRose","toolbar=1,status=1,scrollbars=1,menubar=1,width=800,height=500,alwaysRaised=1,resizeable=1");
  WindRoseWindow.moveTo(0,0);
  WindRoseWindow.document.write('<table border="0" bgcolor="#FFD700"
width="100%"><tr><td colspan="2">');
  WindRoseWindow.document.write('<b><center>Click on February Wind Rose
Graph to Zoom In</b></center>');
  WindRoseWindow.document.write('</td></tr></table><table
width="100%"<tr><td>');
  WindRoseWindow.document.write('<center><a
href="http://www.coaps.fsu.edu/gis/coastal/wind_climo/722110" + mon +
"A.gif"><img
src="http://www.coaps.fsu.edu/gis/coastal/wind_climo/722110" + mon +
"A.gif" height="180" width="240"/></a><br>All</center>');
  WindRoseWindow.document.write('</td><td>');
  WindRoseWindow.document.write('<center><a
href="http://www.coaps.fsu.edu/gis/coastal/wind_climo/722110" + mon +
"W.gif"><img
src="http://www.coaps.fsu.edu/gis/coastal/wind_climo/722110" + mon +
"W.gif" height="180" width="240"/></a><br>El Nino (Warm)</center>');
  WindRoseWindow.document.write('</td></tr><tr><td>');
  WindRoseWindow.document.write('<center><a
href="http://www.coaps.fsu.edu/gis/coastal/wind_climo/722110" + mon +
"N.gif"><img
src="http://www.coaps.fsu.edu/gis/coastal/wind_climo/722110" + mon +
"N.gif" height="180" width="240"/></a><br>Neutral</center>');
  WindRoseWindow.document.write('</td><td>');
  WindRoseWindow.document.write('<center><a
href="http://www.coaps.fsu.edu/gis/coastal/wind_climo/722110" + mon +
"C.gif"><img
src="http://www.coaps.fsu.edu/gis/coastal/wind_climo/722110" + mon +
"C.gif" height="180" width="240"/></a><br>La Nina (Cold)</center>');
  WindRoseWindow.document.write('</td></tr></table><table width="100%"
bgcolor="#FFD700"><tr><td colspan="2">');
  WindRoseWindow.document.write('<a
href="javascript:window.close();"><center><b>Close</b></center></a>');
  WindRoseWindow.document.write('</td></tr></table>');
}

Steve

>>> Gary Watry <watry at steam.coaps.fsu.edu> 8/10/2006 10:30:03 AM >>>
Hi

The site is
http://gisdev.coaps.fsu.edu/httpdocs/windrose.php 

It will run slow as it has not been moved to a production server
Click on "get Info From Map"
Click over red star (any one will do)
Select a month in drop-down list (any will do)
The issue is I had to repeat a block of code over and over again, 
programming by brute force (does anyone know of a better way than 
repeating the code in the

function ChangeMonth()  {

The other question is can I query a shapefile from a test box.
I want to be able to type in a USAFID number and have it zoom into that

location and then open the form without having to click on the map.

Any thoughts

-- 
Gary L. Watry
GIS Coordinator
Center for Ocean-Atmospheric Prediction Studies
FSU / COAPS
Johnson Building, RM 215
2035 East Paul Dirac Drive
Tallahassee, Florida 32306-2840

Phone (850) 645-7457

E-Mail: watry at coaps.fsu.edu 



More information about the mapserver-users mailing list