Hi
The code below creates a repeating DIV called images. The problem I have is that the javascript only works on the first div. How can i make it so that the javascript works on each dynamically created DIV?
Thanks
<?php do { ?>
<div id="image">
<img src="<?php echo $row_rs_images['path']; ?>/<?php echo $row_rs_images['category']; ?>/<?php echo $row_rs_images['image']; ?> "width="100" height="100"/><?php echo $row_rs_images['description']; ?>
</div>
<?php } while ($row_rs_images = mysql_fetch_assoc($rs_images)); ?>
</div>
<script type="text/javascript">
T$('image').onclick = function(){TINY.box.show(content2,0,0,0,1)}
var content2 = "<img src='images/head.png' width='298' height='373' alt='' />";
</script>
The code below creates a repeating DIV called images. The problem I have is that the javascript only works on the first div. How can i make it so that the javascript works on each dynamically created DIV?
Thanks
<?php do { ?>
<div id="image">
<img src="<?php echo $row_rs_images['path']; ?>/<?php echo $row_rs_images['category']; ?>/<?php echo $row_rs_images['image']; ?> "width="100" height="100"/><?php echo $row_rs_images['description']; ?>
</div>
<?php } while ($row_rs_images = mysql_fetch_assoc($rs_images)); ?>
</div>
<script type="text/javascript">
T$('image').onclick = function(){TINY.box.show(content2,0,0,0,1)}
var content2 = "<img src='images/head.png' width='298' height='373' alt='' />";
</script>