Microsoft KB Archive/193229

= BUG: Onchange Unavailable in VBScript with OptionGroup DTC =

Article ID: 193229

Article Last Modified on 3/16/2005

-

APPLIES TO


 * Microsoft Visual InterDev 6.0 Standard Edition

-



This article was previously published under Q193229



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
To work around this problem, use JavaScript instead of VBScript.



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



Steps to Reproduce Behavior
 Open a new Web project in Visual InterDev 6.0, add a new .htm or .asp page, and set the Scripting Platform to the following:

Client (IE 4.0 DHTML)

 Set the client default scripting language to VBScript in the page properties. Add an OptionGroup DTC to the page and a static list of values. Add a Textbox DTC below the OptionGroup DTC. Switch to the Source tab.</li>  Add the following code for the OptionGroup1_onchange event: Sub OptionGroup1_onchange MsgBox "VBScript" End Sub </li> Save the page, and preview the page in the browser.</li> Select an option initially and change to a different option in the group.</li> Set focus to the textbox so that the OptionGroup loses focus.</li></ol>

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

Keywords: kbbug kbscript kbctrl kbpending KB193229

-

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

© Microsoft Corporation. All rights reserved.