I am seeing a mason variable being incremented when the OnClick event handler which does the incrementing is never fired...
<script type="text/javascript"> % my $size = scalar @sortedfiles; var imagearray = new Array(<%$size%>) % for(my $i=0 ; $i<$size ; $i++) { var img = new Image() img.src = "<%$path.$sortedfiles[$i]%>" imagearray[<%$i%>] = img % } function nextImage() { alert("nextImage") % $currentindex++; THIS IS BEING 'RUN'. WHY??? document.images.theimage.src = eval("imagearray[<%$currentindex%>].src") } </script> The currentindex is <%$currentindex%><br> THIS BIT SAYS CURRENTINDEX==1 <form><input type=button OnClick="nextImage()" value="next"></form> <img src=<%$path.$sortedfiles[0]%> name="theimage" /> <%init> my $currentindex = 0; </%init> ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users