Microsoft KB Archive/278631

= Script Error Occurs When You Load the Microsoft BackOffice Small Business Server 4.5 Online Guide =

Article ID: 278631

Article Last Modified on 1/18/2006

-

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:  Make a copy of C:\Winnt.sbs\Help\Sbs.svr\Htm\Xcontent.htm. 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. Locate the following text:

// Explicitly set focus to the hhctrl,

&quot;hhctrl.focus;&quot;

 Replace &quot;hhctrl.focus;&quot; with the following two lines:

// Delay setting focus so window is fully loaded

window.setTimeout(&quot;hhctrl.focus;&quot;,0);

 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(&quot;hhctrl.focus;&quot;,0);

Additional query words: smallbiz

Keywords: kbprb kbpending KB278631

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.