Microsoft KB Archive/190938

= BUG: Error "Thispage Is Undefined" When You View an ASP Page =

Article ID: 190938

Article Last Modified on 10/15/2002

-

APPLIES TO


 * Microsoft Visual InterDev 6.0 Standard Edition

-



This article was previously published under Q190938



SYMPTOMS
You encounter one or both of the following errors when you view your Active Server Pages (ASP) page in a browser:

An error has occurred in the script on this page.

Line: 1

Char: 1

Error: Syntax error

Code: 0

-or-

A Runtime Error has occurred.

Do you wish to Debug?

Line: 1

Error: 'thisPage' is undefined



CAUSE
The scripting object model depends on the Pm.asp file. A line of text is added to the top of your page when you enable the scripting object model to include this file when you load it in a browser. If the file is not loaded for any reason, you encounter one or both of these error messages.

This problem can occur if the browser has a timing issue loading include files, or if the ASP file is in a subfolder of a root Web.



RESOLUTION
If your project is a root Web, and you have scripting object model-dependent ASP pages in a sub folder, copy the _ScriptLibrary folder and its contents to your subfolder.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
The path to the include file for the client support files is calculated by the scripting object model. This is calculated incorrectly in the case of the root Web because a subfolder is always assumed to be in a subproject.

Steps to Reproduce Behavior

 * 1) Open the root Web on a Web server.
 * 2) Create a sub-directory named subdir1 under the root Web.
 * 3) Create an ASP page under subdir1.
 * 4) Open the ASP page.
 * 5) Right-click the page, and then click Properties.
 * 6) Select the Enable scripting object model check box.
 * 7) Click OK, and save the ASP page.
 * 8) View the page in Microsoft Internet Explorer.

Keywords: kbbug kbscript kbwebserver kbpending KB190938

-

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

© Microsoft Corporation. All rights reserved.