Gallery combination

    Date: 07/29/05 (PHP Community)    Keywords: php, html, web

    Right,

    I've got a gallery on a simple site I made for a friends band (apologies in advance if the red is overwhelming)

    http://fourworldtheory.com/gallery.php
    It does it's job BUT when you click on a thumbnail the scroll bar jumps back to the beginning (I know this is because the page re-loads)Which is quite annoying.

    I've been playing with this gallery
    http://fourworldtheory.com/scroll_gallery.html
    And it doesn't jump BUT I have to put all the images in the html first, which is very time consuming etc when there's so many images.

    Does anyone know if I can combine the two as it were?
    Have the php script load the images, then have the gallery that doesn't jump back to the beginning?

    Posted this in '[info]'webdev as well.




    $d = opendir("/home/james/sites/fourworldtheory.com/images/pictures_of_us/thumbs/");
    while(false !== ($f = readdir($d))) {
    if($f == "." || $f == "..") continue;
    print("\t . str_replace("50", "lg", $f) . "\"> alt=\"\"/>\n");
    }
    ?>



    Click to enlarge



    theory.com/images/$_GET[img]")){
    print("\"\"/");
    }?>



    Note: a friend helped me with the php, still very much a beginner myself

    Source: http://www.livejournal.com/community/php/326225.html

« Not Enough Memory? || Valnerability in php? »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home