Subject: Image Gallery Help
Posted By: morpheus Post Date: 1/28/2006 8:07:47 AM
I am creating a website mostly for showing photos.  It's a basic website but on my gallery page I want the preview for each image to show at the top of the page.  Without reloading the page.  The web server supports php which I am not familiar with.  Is there a way to even do this with tables, when you click on an image, the preview shows in the top table? I also need different text to show beside each image preview.  I hope someone can help.

Thanks

-----------------------------------------------------------
"Don't follow someone who's not going anywhere" John Mason
Reply By: vinod_yadav1919 Reply Date: 1/31/2006 11:53:03 PM
Hi Morpheus!!
 
Yes you can do this,in the top table put a <img> or image tag,
on click of the image name, load the image in top table with image's original height and width.

Hope this will help you


Cheers :)

vinod
Reply By: vinod_yadav1919 Reply Date: 2/9/2006 12:39:05 AM
Hii  Morpheus!!!!

plz try the code.
Hope this will help you

 <script>
function clickit(imgname)
{
 
obj=document.getElementById("id1")

//create a tempobject
tempimg=document.createElement("img")
tempimg.src=imgname

//tempimg.src can be either to local folder or any other sites
//tmpimg.src="text.gif"
//in case of local files
//tmpimg.src="http://anyothersite1919.com/foldername/imagename.gif"  
// in case of other websites-servers

obj.src=imgname
obj.height=tempimg.height
obj.width=tempimg.width
 
}
</script>


<table>
</tr>
  <tr><td>
<img id="id1" src="" width="38" height="76" border="0" ></td>
  <td width="100%">&nbsp;</td>
<td>test</td>
 </tr>
</table>

<a href="javascript:clickit('img1.jpg')">View Image1</a> <br>
<a href="javascript:clickit('img2.jpg')">View Image2</a> <br>
<a href="javascript:clickit('img3.gif')">View Image3</a> <br>
<a href="javascript:clickit('img4.gif')">View Image4</a> <br>
<a href="javascript:clickit('img5.gif')">View Image5</a> <br>
<a href="javascript:clickit('img6.gif')">View Image6</a> <br>
<a href="javascript:clickit('img7.gif')">View Image7</a> <br>


Cheers :)

vinod
Reply By: morpheus Reply Date: 2/20/2006 6:45:16 PM
Thanks for the reply's, this project was on hold for a while.  I will try your suggustions and let you know.

Thanks

-----------------------------------------------------------
"Don't follow someone who's not going anywhere" John Mason

Go to topic 40330

Return to index page 364
Return to index page 363
Return to index page 362
Return to index page 361
Return to index page 360
Return to index page 359
Return to index page 358
Return to index page 357
Return to index page 356
Return to index page 355