Microsoft KB Archive/931427

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


A blank Microsoft Script Editor window opens when you try to debug custom script that was written for an InfoPath 2007 form template

Article ID: 931427

Article Last Modified on 2/22/2007



APPLIES TO

  • Microsoft Office InfoPath 2007



SYMPTOMS

When you try to use Microsoft Script Editor to debug custom script that was written for a Microsoft Office InfoPath 2007 form template, a blank Microsoft Script Editor window opens. The script is not displayed. This problem occurs when the custom script was written in the Microsoft JScript or Microsoft Visual Basic Scripting Edition (VBScript) scripting language.

CAUSE

By default, Web Debugging is not installed in the 2007 Microsoft Office system. Therefore, you cannot use Microsoft Script Editor to debug the script because Web Debugging is not installed.

RESOLUTION

To resolve this issue, install Web Debugging.

MORE INFORMATION

Steps to reproduce the issue

  1. Start Microsoft Office InfoPath 2007.
  2. In the Getting Started dialog box, click Design a Form Template.
  3. In the Design a Form Template dialog box, click Blank, click to clear the Enable browser-compatible features only check box, and then click OK.
  4. Click Tools, and then click Form Options.
  5. In the Form Options dialog box, click Programming under Category.
  6. Click JScript or VBScript in the Form template code language list, and then click OK.
  7. Click Tools, click Programming, and then click On Load Event.
  8. In Microsoft Script Editor, type the appropriate code in the OnLoad function, and then click Save. The code that you type in the Onload function depends on the language that you selected as the form template code language:
    • If you selected JScript as the form template code language, type the following code in the OnLoad function.

      debugger;
    • If you selected VBScript as the form template code language, type the following code in the OnLoad function.

      stop
  9. In the InfoPath window, click Preview.
  10. When the Debugger dialog box appears, click Microsoft Script Editor, and then click Yes.


Keywords: kbtshoot kbexpertiseinter kbprb KB931427