View Full Version : PHP Photo Album script - embed image in page

07-02-2007, 04:33 PM
Script: DD PHP Photo Album script

This is a great script, but instead of popping open a window, how would I get the image to embed in the page? Is there a way I can embed in a div tag or table somewhere? Thanks for any suggestions.


My site

07-03-2007, 05:46 AM
The function popuplinkfunc() is what causes a popup window to launch and display the enlarged image. To get the image to load in a DIV on the page, you'd edit this function to do this. The result may look something like:

function popuplinkfunc(imgsrc){
if (popupsetting[0]==1){
document.getElementById("targetdiv").innerHTML='<img src="'+imgsrc.href+'" />'
return false
return true

Where "targetdiv" is the ID of the DIV element you should add to your page, something like:

<div id="targetdiv"> </div>