This is a discussion on Select Thumbnail images and view the larger image within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Can anybody help me out... User have to select several thumbnail images and should view the larger images....
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Can anybody help me out... User have to select several thumbnail images and should view the larger images.
__________________ H2O Without us, no one can survive.. |
| Sponsored Links |
| |||
| try out this code.... <html> <head> <style> body { background-color:#000000; color:#E27907; font-family:Verdana,Arial; font-size:10pt; letter-spacing:2; } .thumbNormal { border:4px solid #000000; } .thumbSelected { border:4px solid #ff0000; } </style> <script language=javascript> var lastID = 0; function SelectImg(id) { if (lastID > 0) { document.getElementById(lastID).className = "thumbNormal"; } document.getElementById(id).className = "thumbSelected"; document.getElementById(0).src = document.getElementById(id).src; lastID = id; } function LoadTrigger() { SelectImg(1); } window.onload = LoadTrigger; </script> </head> <body> Click a photo on the left to view full size. <table border=0> <tr> <td valign=top> <img id=1 class="thumbNormal" src="http://www.codetoad.com/images/3lio103.jpg" width=120 onclick="SelectImg(1)"> <br><img id=2 class="thumbNormal" src="http://www.codetoad.com/images/3lio20.jpg" width=120 onclick="SelectImg(2)"> <br><img id=3 class="thumbNormal" src="http://www.codetoad.com/images/3lion19.jpg" width=120 onclick="SelectImg(3)"> </td> <td width=15> </td> <td valign=top> <img id=0 src=""> </td> </tr> </table> </body> </html> |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Showing the Image file thumbnail view in ListView control using VC++ 6.0 | prabhat.singh | C and C++ Programming | 0 | 01-17-2008 10:53 PM |
| How to select an element by id and swapping an image ? | kingmaker | HTML, CSS and Javascript Coding Techniques | 2 | 10-27-2007 12:05 AM |
| How to create BMP thumbnail image in PHP? | Jeyaseelansarc | PHP Programming | 2 | 10-13-2007 01:05 AM |
| How to create a Thumbnail Images even the users give in different ration in c#. | H2o | C# Programming | 4 | 08-10-2007 01:00 AM |
| Align images relative to a particular image? | oyu2o | HTML, CSS and Javascript Coding Techniques | 0 | 03-10-2007 10:30 PM |