Keyboard navigation in photoalbum

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Juha-markku Liikala

    Keyboard navigation in photoalbum

    Hi!

    I've just started to learn PHP, so this may be a dumb quiestion, but I'll
    ask it anyway...

    Is it possible to create a photoalbum (or make use of such) with PHP,
    where I could navigete with my keyboard? When some picture from a gallery
    would be selected, could I navigate to next or previous picture by using
    for example buttons "n" and "p" from my keyboard? Is this possible to do
    with PHP or should I use JavaScript or such instead?

    Thanks!

    Juha-Markku Liikala
    Department of Information Processing Science
    University of Oulu, Finland
  • Kevin Thorpe

    #2
    Re: Keyboard navigation in photoalbum

    Juha-markku Liikala wrote:
    [color=blue]
    > Hi!
    >
    > I've just started to learn PHP, so this may be a dumb quiestion, but I'll
    > ask it anyway...
    >
    > Is it possible to create a photoalbum (or make use of such) with PHP,
    > where I could navigete with my keyboard? When some picture from a gallery
    > would be selected, could I navigate to next or previous picture by using
    > for example buttons "n" and "p" from my keyboard? Is this possible to do
    > with PHP or should I use JavaScript or such instead?[/color]

    php is server side. Your script has finished execution by the time the
    document is displayed.

    Javascript can capture keys:

    function keypress() {
    key = event.keyCode;
    }

    document.onkeyd own = keypress();

    Comment

    • David Mackenzie

      #3
      Re: Keyboard navigation in photoalbum

      On Thu, 20 Nov 2003 14:21:00 +0200, Juha-markku Liikala
      <jliikala@mail. student.oulu.fi > wrote:
      [color=blue]
      >Hi!
      >
      >I've just started to learn PHP, so this may be a dumb quiestion, but I'll
      >ask it anyway...
      >
      >Is it possible to create a photoalbum (or make use of such) with PHP,
      >where I could navigete with my keyboard? When some picture from a gallery
      >would be selected, could I navigate to next or previous picture by using
      >for example buttons "n" and "p" from my keyboard? Is this possible to do
      >with PHP or should I use JavaScript or such instead?[/color]

      If you want to use an existing album site, try Opera 7. It can
      automatically work out which links are the "previous" and "next" ones.
      You can navigate these links by pressing CTRL+ the left and right
      arrow keys. I find this feature invaluable for speedy browsing of
      search results from Google, eBay, etc.

      If you're writing one and want to add this feature, try adding LINK
      elements in your <head> thus:
      <link rel="prev" href="album.php ?page=4">
      <link rel="next" href="album.php ?page=6">

      Some browsers may allow keyboard navigation of these links.

      I was also going to suggest using the accesskey attribute, but from
      what I've read it appears poorly supported and inconsistently
      implemented.

      --
      David ( @priz.co.uk )
      The Internet Prisoner Database: http://www.priz.co.uk/ipdb/
      The Tarbrax Chronicle: http://www.tarbraxchronicle.com/

      Comment

      Working...