Results 1 to 3 of 3

Thread: Position Content in Photo Album script v2.0

  1. #1
    Join Date
    May 2008
    Location
    SF, CA
    Posts
    4
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question Position Content in Photo Album script v2.0

    1) Script Title: Photo Album script v2.0

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/photoalbum.htm

    3) Describe problem: I'm working with the photo album script on the following site: http://arts.ucsc.edu/faculty/watts/pages/noalbum.html

    As you will see, I have the image links open to a full screen window. What I want to do is to position the content (the full size images) in the center and middle of the pop up page. Is this possible and if so...how? :-) I know enough to get my self stuck so don't assume I know too much in your explanation.

    Your assistance is deeply appreciated...

    cheers!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Give this a shot:

    Code:
    noalbum.onselectphoto=function(img, link){
    if (link!=null) {//if this image is hyperlinked
    var bob=window.open('', "", "fullscreen=1, status=1, resizable=1");
    bob.document.write('<body style="margin:0;padding:0;overflow:auto;" onclick="self.close();"><center>'+
    '<img alt="" title="Click to Close" border=1 src="'+link.href+'" style="visibility:hidden;">'+
    '<script type="text/javascript">'+
    'onload=function(){var h=window.innerHeight? window.innerHeight : document.body.clientHeight;'+
    'if(h>document.images[0].offsetHeight) document.images[0].style.marginTop=h/2-document.images[0].offsetHeight/2+\'px\';'+
    'document.images[0].style.visibility=\'visible\';}'+
    '<\/script>');
    bob.document.close();
    }
    return false //cancel default action when clicking on image, by returning false instead of true
    }
    Use it in place of your current noalbum.onselectphoto function.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Nyetah (05-27-2008)

  4. #3
    Join Date
    May 2008
    Location
    SF, CA
    Posts
    4
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    i am humbled by your help. it works perfectly!

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
  •