peuge Posted June 24, 2008 Share Posted June 24, 2008 Ok so this is what I am wanting: I have two iFrames one below the other. The top one is big and is used for the large image, the bottom one holds the thumbnails. So far I have the bottom one so that it gets all the images out of images/thumbs directory and displays them. In this (thumbs.php) each image is shown like this and links to the bigger image. foreach($files as $file) { if($colCtr %$cols == 0) echo '</tr><tr><td colspan="1"><hr /></td></tr><tr>'; $var = $images.$big.$file; $moreData = $_GET[$var]; echo '<td align="center"><a href="largepic.php?var=' . $var . '"><img src="' . $images . $file . '" /></a></td>'; $colCtr++; } Ok all fine so far, the images show up and when clicked it opens largepic.php with the larger image. But now I want largepic.php to open up in the iFrame on top and not the one where thumbs.php was and for thumbs.php to remain as is. Right now it opens up in the iFrame where thumbs.php was. Is it possible to do this? Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/111642-trying-to-make-image-gallery-help/ Share on other sites More sharing options...
Tchelo Posted June 27, 2008 Share Posted June 27, 2008 Sure. You could change your href to something like this: <a href="javascript:document.getElementById('the_id_of_top_frame').src=largepic.php?var.... I guess it should work with both IE and FF due to getElementById, but not sure. Link to comment https://forums.phpfreaks.com/topic/111642-trying-to-make-image-gallery-help/#findComment-575635 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.