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
- 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)
- 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.
- Add the following code for the OptionGroup1_onchange event:
Sub OptionGroup1_onchange
MsgBox "VBScript"
End Sub
- Save the page and preview in browser.
- Select an option initially and change to a different option in the
group.
- 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