son Posted June 1, 2008 Share Posted June 1, 2008 Not sure if JavaScript or PHP section is right one, my problem is a mixture of both. Hope someone can help...I get the sizes of all my images via the PHP getimagesize function. I also have thumbs with span around to change main image as: <span onmouseover="document.getElementById('rollimg').src=image1.src;">How do I amend:list($width, $height, $type, $attr) = getimagesize("{$mainPath}/{$main1}");which is just before <?php echo '<img src="' . $mainPath . '/'. $row['img1'] . '" ' . $attr . ' alt="Feature Photo" name="rollimg" id="rollimg" />'; ?> to get the relevant $attr for: image0.src = '<?php echo "{$mainPath}/{$main1}";?>'; image1.src = '<?php echo "{$mainPath}/{$main2}";?>'; image2.src = '<?php echo "{$mainPath}/{$main3}";?>'; image3.src = '<?php echo "{$mainPath}/{$main4}";?>'; image4.src = '<?php echo "{$mainPath}/{$main5}";?>'; image5.src = '<?php echo "{$mainPath}/{$main6}";?>'; image6.src = '<?php echo "{$mainPath}/{$main7}";?>'; image7.src = '<?php echo "{$mainPath}/{$main8}";?>'; I really would appreciate a hint in right direction. SonReason for edit: Spelling mistake, which lead to wrong question Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.