home *** CD-ROM | disk | FTP | other *** search
-
- /* This script provides invisible focusable elements at the top. bottom, left and right of a frame-content page. When you focus on
- any of these, the focus will automatically go back up to the parent page that contains the frame. This allows you to jump the
- focus back and forth between the parent and child pages; when you click past the last button in any direction you hit one of
- these placeholders and the focus moves back to the parent page. (The reason they are positioned so far off the visible page is
- to make sure that each is focusable from any element on the page when you hit the arrow for that direction.) */
-
- var pageWidth = body.scrollWidth
- var pageHeight = body.scrollHeight
-
- //document.write ('<span MCFocusable="true" style="position: absolute; top: -1000; left: 0; width: 100%; height: 20;" onfocus="sendFocusBackToParent()"></span>') // top element
- //document.write ('<span MCFocusable="true" style="position: absolute; top: ' + (pageHeight + 1000) + '; left: 0; width: 100%; height: 20;" onfocus="body.scrollTop=0;sendFocusBackToParent()"></span>') // bottom element
-
- document.write ('<span MCFocusable="true" style="position: absolute; top: 0; left: -1000; width: 20; height: 100%;" onfocus="sendFocusBackToParent()"></span>') // left element
-
- //document.write ('<span MCFocusable="true" style="position: absolute; top: 0; left: ' + (pageWidth+1000) +'; width: 20; height: 100%;" onfocus="body.scrollLeft=0;sendFocusBackToParent()"></span>') // right element
-
-
-
- function sendFocusBackToParent()
- {
- //this function sends the focus back to the parent page
- oCurFocus = null
- window.top.moveFocusBackToIFrame();
- }
-