0

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>
2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by ksquared
0

what do you mean loop in this code, do you mean accessing this code several types from javascript using AjAX?

0

what do you mean loop in this code, do you mean accessing this code several types from javascript using AjAX?

I did mean that way back a day ago, but the code and my understanding have changed dramatically since then. Thank you for your reply. Just for learning's sake, tho, wondering if that was possible? Please don't bother, if you're otherwise engaged.

Edited by ksquared: n/a

0

Thanks! I'll figure that out when I have some time. If I don't have a goal for learning, I'm too lazy to do it =\

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.