Forum Moderators: open
Some of the sites we load do not leave the keyboard scroll "focus" so that we can can use pgup and pgdn controls from the touchscreen control panel. This is generally when the site has been written using frames or div'ed tables with different z-index'es.
Does anyone know how to set the keyboard focus to an area reliably after loading (I've tried altering the z-index on the fly to have the table I want with the highest index but that does not seem to give consistent results)?
As long as I know how to do it as if I was writing the page then I can do it with the proxy on the fly.
This is IE only since we dictate the browser for the system - and it can't be swapped easily without knockon implications in other code.
Cheers
In the <head> (or an external js file):
<script type="text/javascript">
function setPageFocus(obj) {
document.getElementById(obj).focus();
}
</script>
In the <body> tag:
<body onload="setPageFocus('pageFocus')">
And then in the document itself surround the object you want to place the focus on with this <a>nchor information:
<a href="#" id="pageFocus">...</a>
HTH