PRB: Components Not Recognized when Enabling the Scripting Model

ID: Q192146


The information in this article applies to:


SYMPTOMS

When enabling the Scripting Object Model after controls/objects have already been placed on an Active Server Pages (ASP) page, the controls/objects will no longer be recognized for statement completion and in the Script Outline. As a result, statement completion will not work and you will now see the component in the Script Outline under the "thisForm" object.


CAUSE

When the Scripting Object Model is enabled in ASP pages, the controls/objects that have been inserted on the page are within the <FORM> tags of the Scripting Object Model code. Therefore, any existing reference to your controls/objects inside the <FORM> tags will no longer be recognized as before.


RESOLUTION

You can change your code to reference the existing controls/objects through the "thisForm" object.


STATUS

This behavior is by design.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Web Project in Visual InterDev 6.0.


  2. Add a new ASP page to the project.


  3. Add an HTML object or ActiveX control to the ASP page.


  4. Add some client-side script that changes the properties of that control/object and notice that statement completion is working and that you can see the control/object in the Scripting Outline.


  5. Right-click the page and select Properties from the Shortcut menu.


  6. On the General tab of the Properties dialog box check "Enable scripting object model."


The statement completion is not working and the control/object is under the "thisForm" object in the Scripting Outline.

Additional query words:


Keywords          : kbCtrl kbScript kbVisID600 kbGrpASP 
Version           : WINDOWS:6.0
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: May 24, 1999