Results 1 to 2 of 2

Thread: PHP Photo Album script - embed image in page

  1. #1
    Join Date
    Jul 2007
    Location
    Queens, NY
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default PHP Photo Album script - embed image in page

    Script: DD PHP Photo Album script
    http://www.dynamicdrive.com/dynamici...photoalbum.htm

    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.

    - JOE

    My site
    http://kevlynch.justfree.com/

  2. #2
    Join Date
    Aug 2004
    Posts
    9,878
    Thanks
    3
    Thanked 962 Times in 951 Posts
    Blog Entries
    15

    Default

    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:

    Code:
    function popuplinkfunc(imgsrc){
    if (popupsetting[0]==1){
    document.getElementById("targetdiv").innerHTML='<img src="'+imgsrc.href+'" />'
    return false
    }
    else
    return true
    }
    Where "targetdiv" is the ID of the DIV element you should add to your page, something like:

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •