BUG: Date Time Picker Marked Unsafe for Scripting (259460)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 3.0
- Microsoft Internet Explorer (Programming) 3.01
- Microsoft Internet Explorer (Programming) 3.02
- Microsoft Internet Explorer (Programming) 4.0
- Microsoft Internet Explorer (Programming) 4.01
- Microsoft Internet Explorer (Programming) 4.01 SP1
- Microsoft Internet Explorer (Programming) 4.01 SP2
- Microsoft Internet Explorer (Programming) 5
- Microsoft Internet Explorer (Programming) 5.01
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0 SP3
This article was previously published under Q259460 SYMPTOMS
When you use the Date Time Picker control on a Web page, depending on the security level set in Internet Explorer, Internet Explorer may display the following warning message:
An ActiveX object on this page may be unsafe. Do you want to allow it to be initialized and accessed by scripts?
NOTE: Controls that are inherited from the Date Time Picker may also encounter this problem. For example, the Month View control that comes with MSCOMCTL2.cab is marked as unsafe for initialization and scripting in Internet Explorer 5.0 and 5.5 because it depends on the Date Time Picker control. Other custom controls that are extended from this control may also encounter this problem in which the control is marked as unsafe for scripting.
CAUSE
Date Timer Picker was incorrectly marked as unsafe for scripting. However, it is safe for initialization.
By default, Internet Explorer is configured to disable scripting to an ActiveX control that is not marked safe for scripting. (To change this setting, go to Control Panel, double-click Internet Options, and click the Security tab.)
RESOLUTION
To overcome this problem, wrap Date Time Picker in your own control and expose the appropriate properties and interfaces. Mark it safe by implementing IObjectSafety. See the "More Information" section of this article for detailed information on how to do this.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. REFERENCES
Modification Type: | Major | Last Reviewed: | 6/24/2004 |
---|
Keywords: | kbBug kbcode kbDownload kbnofix kbSBNWorkshop KB259460 |
---|
|