Is there some way I can loop through this code? using Ajax? Thanks for any recommendations.
<?php
$paintingBack=$paintingNumber-1;
$paintingNext=$paintingNumber+1;
if ($paintingBack < 1) {
$paintingBack = $paintingBack + 1;} ?>
<a href="" id="link1" class='link'><img src='images/braceL.gif' alt='brace' width='20' height='11' valign='text-bottom'/></a>
<script type="text/javascript">
var l = document.getElementById("link1");
l.onFocus = function() {
if(this.blur)this.blur();
}
l.onclick = function() {
document.getElementById("imagediv").innerHTML = "<img src='images/painting_<? echo $paintingBack; ?>.jpg />'";
return false;
}
</script>