S
Stefan Mueller
With the following code I try to set the focus to the first anchor just
after the page has been loaded. However, it doesn't work. Exactly spoken the
focus is set to the first anchor (if you press Enter, page1.html will be
loaded) but the caret (box around the anchor) is not visible.
I've the same behavior if I drag and drop the code to the browser window.
Is there something like a refresh?
Stefan
PS: With Mozialla and Opera it usually works, but not with Internet Explorer
=============================================
<html>
<head>
<script type = "text/javascript">
function formloaded() {
document.getElementById("MyLink1").focus();
}
</script>
</head>
<body onLoad = "formloaded()">
<a href = "page1.html" id = "MyLink1" tabindex = "1">Page 1</a>
<br>
<a href = "page2.html" id = "MyLink2" tabindex = "2">Page 2</a>
</body>
</html>
=============================================
after the page has been loaded. However, it doesn't work. Exactly spoken the
focus is set to the first anchor (if you press Enter, page1.html will be
loaded) but the caret (box around the anchor) is not visible.
I've the same behavior if I drag and drop the code to the browser window.
Is there something like a refresh?
Stefan
PS: With Mozialla and Opera it usually works, but not with Internet Explorer
=============================================
<html>
<head>
<script type = "text/javascript">
function formloaded() {
document.getElementById("MyLink1").focus();
}
</script>
</head>
<body onLoad = "formloaded()">
<a href = "page1.html" id = "MyLink1" tabindex = "1">Page 1</a>
<br>
<a href = "page2.html" id = "MyLink2" tabindex = "2">Page 2</a>
</body>
</html>
=============================================