Microsoft KB Archive/172064
Article ID: 172064
Article Last Modified on 8/18/2005
- Microsoft ActiveX SDK
This article was previously published under Q172064
Beginning with Microsoft Internet Explorer 4.0, the default property of an ActiveX control in a form can be submitted with the form.
If the control does not have a default property or the HTML page is viewed in Internet Explorer 3.x (IE3), the contents of the ActiveX control in a form will not be included when the form is submitted. This article discusses how to submit the contents by using a hidden input field on the form.
In Internet Explorer 4.0 and later, the contents of an ActiveX control in a form can be submitted with the form. The NAME is the identifier of the object tag (that is, <OBJECT NAME=MyControl CLASSID=...>), and the VALUE is the value of the default property of the control (if it exists). However, if any of the following cases are true, the contents of the control will not be included in the submit string:
The object did not instantiate The object does not have an identifier The object does not have a default property The default property cannot be coerced into a string
The following is a complete HTML example that demonstrates using the default property method with the Microsoft Forms 2.0 Textbox Control and the "hidden" input method with the Microsoft Calendar Control.
Using Active Server Pages on the server to receive this information would look like this:
<%@ LANGUAGE="VBSCRIPT" %> <HTML> <BODY> The User Name is <%Response.Write Request.form("UserName")%><br> The Password is <%Response.Write Request.form("Password")%><br> The TextBox is <%Response.Write Request.form("RichText")%><br> The Calendar date is <%Response.Write Request.form("Cal")%><br> </BODY> </HTML>
In Internet Explorer 3.0, the value of the TextBox1 and Calendar1 ActiveX Controls would not be submitted with the form, and thus would not appear in the output from the ASP page.
Keywords: kbhowto kbcode KB172064