BUG: "Thispage Is Undefined" Error When Viewing an ASP Page

ID: Q190938


The information in this article applies to:


SYMPTOMS

You see one or both of the following errors when viewing 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 loaded in a browser. If the file is not loaded for any reason, you will see this error.

This can happen 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 this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.


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 under the root Web. Call it subdir1.


  3. Create an ASP page under subdir1.


  4. Open the ASP page.


  5. Right-click the page and select Properties.


  6. Select "Enable scripting object model."


  7. Click OK and save the ASP page.


  8. View the page in Internet Explorer.


Additional query words:


Keywords          : kbScript kbVisID600 kbVisID600bug kbWebServer kbGrpASP 
Version           : WINDOWS:6.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 24, 1999