Need advice for image browser.

Discussion in 'PHP' started by sedna16, Feb 17, 2009.

  1. #1
    Hi!
    I'm totally a newbie in terms of programming, but I need to make a script like this.

    Description:
    Image browsing (no thumbnails) from one image to another.
    can use keyboard keys to browse like right arrow(next) and left arrow(previouse.
    will go to the next image by clicking the image.
    with dropdown menu showing all images in the album and all the album.

    please I need someone to teach me. thank you :)
     
    sedna16, Feb 17, 2009 IP
  2. websecrets

    websecrets Peon

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You'll need a little mix of JavaScript and PHP to get what you're looking for..

    ======================================

    <script language="JavaScript">
    function getArrowKey(event)
    {

    var key = 'start';

    switch (event.keyCode)
    {
    case 37:
    key = 'loadleftimage.php';
    break;
    case 39:
    key = 'loadrightimage.php';
    break;
    default:
    key= 'showallimages.php';
    }
    window.location.href = key
    }
    </script>

    <a href="images.php?imagetoshow=<? print("$nextimageid"); ?>"><img src="thisimage.jpg">
     
    websecrets, Feb 17, 2009 IP
  3. sedna16

    sedna16 Peon

    Messages:
    44
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    great thanks for the tip but how will I setup this variable?

    "?imagetoshow=<? print("$nextimageid"); ?>"
     
    sedna16, Feb 17, 2009 IP