<div><br>Ian:</div>
<div>&nbsp;</div>
<div>Remember to write the imgxy value&nbsp;(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>&nbsp;&nbsp; var x, y;<br>&nbsp;&nbsp; if(direction == &#39;n&#39;) {<br>&nbsp;&nbsp;&nbsp;&nbsp; x = (400-1)/2.0;<br>&nbsp;&nbsp;&nbsp;&nbsp; y = 0 - (300 * pansize)/2.0;<br>....etc<br>&nbsp; document.mapserv.imgxy.value = x + &quot; &quot; + y;</div>

<div>&nbsp;&nbsp;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 &lt;<a href="mailto:ian.maxfield@aimtc.nhs.uk">ian.maxfield@aimtc.nhs.uk</a>&gt;:</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.&nbsp;&nbsp; None of the code that includes javascript will work.&nbsp;&nbsp;E.g.<br>when you click on a pan icon to call the javascript function pan(direction),
<br>nothing will happen.&nbsp;&nbsp;One of the function calls is as follows:<br><br>&lt;td align=&quot;right&quot; width=&quot;18&quot;&gt;&lt;a href=&quot;javascript:pan(&#39;ne&#39;)&quot;&gt;&lt;img<br>src=&quot;graphics/nw.png&quot; width=&quot;18&quot; height=&quot;18&quot; border=&quot;0&quot; alt=&quot;pan
<br>northwest&quot;&gt;&lt;/a&gt;&lt;/td&gt;<br><br>Should call;<br><br>function pan(direction) {<br>&nbsp;&nbsp; var x, y;<br>&nbsp;&nbsp; if(direction == &#39;n&#39;) {<br>&nbsp;&nbsp;&nbsp;&nbsp; x = (400-1)/2.0;<br>&nbsp;&nbsp;&nbsp;&nbsp; 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(&#39;nw&#39;), but then nothing happens on the actual mouse click.<br><br>As you can imagine the problem is driving me slightly insane.&nbsp;&nbsp;Is there
<br>something obvious that I am missing?&nbsp;&nbsp;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>