This code is loaded for a picture frame page. When first loaded, it arranges to capture keystrokes.
When any of these are typed |
|
The image is switched to |
RIGHT , DOWN , PAGE-DOWN , ENTER , SPACE |
|
next image |
LEFT, UP, PAGE-UP |
|
previous image |
Details
On the frame page, the NEXT and PREV buttons have no content, but they do have id's: nextdestination
and prevdestination
, respectively. They look like this.
<a id="nextdestination" href="DSC04101.php"
class="nextbutclass"></a>
Images for the buttons are provided in GeneralStyles.css
with rules like this:
.nextbutclass:before {
content:url("/images/NEXTbutton.png")
}
.nextbutclass:hover:before {
content:url("/images/NEXTbuttonh.png")
}
Depending on the keystroke, the code finds either nextdestination
or prevdestination
. From this object it fetches the href
attribute and jumps to that page by setting window.location.href
.