BUG: Onchange Unavailable in VBScript with OptionGroup DTC

ID: Q193229


The information in this article applies to:
  • Microsoft Visual InterDev, version 6.0


SYMPTOMS

When an OptionGroup Design-time control (DTC) is used on an HTML or Active Server Pages (ASP) page, the onchange event associated with the DTC is not available when the Scripting Platform is set to "Client (IE 4.0 DHTML)" and the scripting language is set to VBScript. As a result, any code in the OptionGroup1_onchange() event does not get executed.


RESOLUTION

Use JavaScript instead of VBScript.


STATUS


MORE INFORMATION

Steps to Reproduce Behavior

  1. Open a new Web project in Visual InterDev 6.0 and add a new .htm or .asp page and set the Scripting Platform to the following:
    
    Client (IE 4.0 DHTML) 


  2. Set the client default scripting language to VBScript in the page properties.


  3. Add an OptionGroup DTC to the page and a static list of values.


  4. Add a Textbox DTC below the OptionGroup DTC.


  5. Switch to the Source tab.


  6. Add the following code for the OptionGroup1_onchange event:
    
          Sub OptionGroup1_onchange
             MsgBox "VBScript"
          End Sub 


  7. Save the page and preview in browser.


  8. Select an option initially and change to a different option in the group.


  9. Set focus to the textbox so that the OptionGroup loses focus.


You will notice that the Message box does not appear, indicating that the OptionGroup1_onchange event never fires.

Additional query words:

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


Last Reviewed: May 27, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.