Script Error Occurs When You Load the Microsoft BackOffice Small Business Server 4.5 Online Guide (278631)



The information in this article applies to:

  • Microsoft BackOffice Small Business Server 4.5

This article was previously published under Q278631

SYMPTOMS

When you upgrade Internet Explorer to version 5.5 on Microsoft BackOffice Small Business Server (SBS), and then load the SBS Console Online Guide, you may receive the following script error message:
An error has occurred in the script on this page.
Line: 64
Char: 2 Error: Can't move focus to the control because it is invisible, not enabled, or
of a type that does not accept the focus.
Code: 0
URL: http://localhost/help/sbs.svr/htm/xcontent.htm

CAUSE

When you use a script to set the focus to an element, a timing issue can occur because the window.onload event is called before the document is fully loaded.

RESOLUTION

To resolve this issue, modify the code for the Xcontent.htm to delay setting focus until the window is fully loaded:
  1. Make a copy of C:\Winnt.sbs\Help\Sbs.svr\Htm\Xcontent.htm.
  2. Use Microsoft Notepad or another text editor to start the file Xcontent.htm file that is located in the path C:\Winnt.sbs\Help\Sbs.svr\htm.
  3. Locate the following text:

    // Explicitly set focus to the hhctrl,
    "hhctrl.focus();"

  4. Replace "hhctrl.focus();" with the following two lines:

    // Delay setting focus so window is fully loaded
    window.setTimeout("hhctrl.focus();",0);

  5. Save the file.
The new code definition is now:

// Explicitly set focus to the hhctrl
// Delay setting focus so window is fully loaded
window.setTimeout("hhctrl.focus();",0);


Modification Type:MinorLast Reviewed:1/18/2006
Keywords:kbpending kbprb SBS45 KB278631