473,395 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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
Jul 17 '05 #1
2 2152
Juha-markku Liikala wrote:
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?


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.onkeydown = keypress();

Jul 17 '05 #2
On Thu, 20 Nov 2003 14:21:00 +0200, Juha-markku Liikala
<jl******@mail.student.oulu.fi> wrote:
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?


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/
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andrus Moor | last post by:
I want to use the keyboard keys for navigation in menu: 1. Alt+hotkey must activate menu bar 2. Left and right arrow must move between menus, 3. Up and Down arrow move between menu items. 4....
9
by: Marek Mand | last post by:
How to use generated keyboard events? What I am trying here to do is in onkeyup event handler http://www.hot.ee/idaliiga/braggart/createEventTest.htm generate a (shift)TAB keydown so the...
8
by: Yeah | last post by:
I wish to use a drop box where each Option will not take the user to a web page - but a certain location on the same page the drop box exists. For example, Option 1 would take the user to "Chapter...
1
by: Richard Coutts | last post by:
I have a Continous Form with 5 or so fields for each record, in a line from left to right. Because the Contuous Form lists several records at once, the form looks pretty much like a Datasheet. ...
1
by: Stefan | last post by:
I'd like to display the keyboard navigation indicators in my C# application without the user having to press the Alt key and regardless of the machines global setting (Hide keyboard navigation...
2
by: michael sorens | last post by:
After extensive searching of the docs, I find no mention of support for Ctrl-Tab and Ctrl-Shift-Tab to navigate among tabs in a TabControl. I am surprised that such a common/standard keyboard...
2
by: Samuel Shulman | last post by:
I just started using VS 2005 and I can't find the Navigation buttons (which are very useful) Were they removed from this version or they can be found elsewhere? Thank you, Samuel
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.