<div><br>Ian:</div>
<div> </div>
<div>Remember to write the imgxy value (hidden variable on your template) with the resulting x,y values obtained on your pan function. something like:</div>
<div><br>function pan(direction) {<br> var x, y;<br> if(direction == 'n') {<br> x = (400-1)/2.0;<br> y = 0 - (300 * pansize)/2.0;<br>....etc<br> document.mapserv.imgxy.value = x + " " + y;</div>
<div> document.mapserv.submit();</div>
<div>}</div>
<div>it should work. Hope it helps</div>
<div><br>Regards</div>
<div>Luis</div>
<div><span class="gmail_quote">2007/3/14, Ian Maxfield <<a href="mailto:ian.maxfield@aimtc.nhs.uk">ian.maxfield@aimtc.nhs.uk</a>>:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hello all,<br><br>ms4w installed<br>Windows XP (iis uninstalled)<br><br>I have been working my way quite happily through the MapServer
4.6 tutorial,<br>and have been doing fine until I have tried using the examples that include<br>javascript. None of the code that includes javascript will work. E.g.<br>when you click on a pan icon to call the javascript function pan(direction),
<br>nothing will happen. One of the function calls is as follows:<br><br><td align="right" width="18"><a href="javascript:pan('ne')"><img<br>src="graphics/nw.png" width="18" height="18" border="0" alt="pan
<br>northwest"></a></td><br><br>Should call;<br><br>function pan(direction) {<br> var x, y;<br> if(direction == 'n') {<br> x = (400-1)/2.0;<br> y = 0 - (300 * pansize)/2.0;<br>....etc
<br><br>Tests I have tried:<br>- created test functions to display alerts<br>- changed the href to onclick calls<br>- created new function calls elsewhere in the html document<br><br>The javascript looks correct in that when you move the cursor onto the arrow
<br>the screen text at the bottom of the screen displays the function e.g.<br>javascript:pan('nw'), but then nothing happens on the actual mouse click.<br><br>As you can imagine the problem is driving me slightly insane. Is there
<br>something obvious that I am missing? Could it be to do with where the ms4w<br>folder is stored?<br><br>Any help would be greatly appreciated,<br><br>Ian<br></blockquote></div><br>