wesley Posted October 21, 2015 Share Posted October 21, 2015 Hello, I have written php script. You see three thumbnails. When you click on the thumbnail the browser open a new screen with the big photo. and i work without database. I want to have that the big photo under the thumbnail is, and not a new window or pop-up. my question is: how can i make this? thanks in advance. my code is: <!DOCTYPE HTML><html lang="en"><head> <title></title> <style> img{ border: 1px dotted red; } </style></head><body><?php$dir = "images/";//open directoryif ($opendir = opendir($dir)){ //read directory while (($file = readdir($opendir)) !== FALSE) { if($file !="."&&$file!="..") echo "<a href='$dir/$file'><img src='$dir/$file' height='100'></a>";//show thumbnail }}?></body></html> Link to comment Share on other sites More sharing options...
justsomeguy Posted October 21, 2015 Share Posted October 21, 2015 I want to have that the big photo under the thumbnail is, and not a new window or pop-up.The big photo under the thumbnail is what? What exactly do you want to happen? Link to comment Share on other sites More sharing options...
wesley Posted October 21, 2015 Author Share Posted October 21, 2015 Hello, I have make a screenshot how it should be. maybe is this better. How can I make this? the code show the thumbnails and now the "big photo" under the thumbnails. Link to comment Share on other sites More sharing options...
justsomeguy Posted October 21, 2015 Share Posted October 21, 2015 One option would be to use Javascript to get the src of the image and set the big image to the same src. Those aren't actually thumbnails, just the big image displayed smaller, so you can use the same src for the big image. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now