DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   Easy w Frames tough w CSS (http://www.daniweb.com/forums/thread115530.html)

DWSandyS Mar 24th, 2008 10:12 pm
Easy w Frames tough w CSS
 
I am new to Dreamweaver, and stumped. Though I can do it easily with frames I cant get CSS to allow user to click on one of several thumbnails in a left column and show larger image of the clicked thumb in the main area of the SAME page. Is it possible? Thanks for helping.

hunkychop Mar 24th, 2008 11:47 pm
Re: Easy w Frames tough w CSS
 
here is how to do it in javascript:

  1. <!-- your image -->
  2. <img src="YOUR_THUM_IMAGE_PATH" onclick="javascript:fillDiv('YOUR_BIG_IMAGE_PATH','div1');" />
  3.         <div id="div1" style="width:100; border:thick; display:inline;">click the image to make new image appear here</div>
  4.  
  5. <script type="text/javascript">
  6. function fillDiv(imgurl, div){
  7.         document.getElementById(div).innerHTML="<img src='"+imgurl+"' />";
  8. }
  9. </script>


All times are GMT -4. The time now is 5:30 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC