-
Calendar AxtiveX Control
I'am trying to use the Microsoft Calendar ActiveX Control on a page so users can select a date from the Calendar. When a user selects a date, I put the value in a textbox to use in a form to query information from a database based on the chosen date.
I have the folowing code:
Sopose I the calendar name is Calendar1
and the name of the textbox in my form is txtDate.
<script language="vbscript">
Sub StartDate_Click()
txtDate.value = Calendar1.value
End Sub
</script>
This code is fine, but I cant use the textbox in a form. I gaves some errors. When the textbox is not in the form it is OK. But I want the textbox to be in the form to post the textbox value to query the database.
Someone have an idea how to implement this???[COLOR=skyblue]
-
Hi, I understand your problem.
I used to have some problems embedding intrinsic VB controls on a Webpage.
Make sure you have embedded the right ClassID for your control. The only way I check it is to go to the Win Registry and make sure the ClassID is the same as the one I embed on the Webpage. Use the Forms2.0 Control. They work better...(to me)
Also you have an error in your code.
If your txtDate is a textbox, there is NO value property. I think you meant its TEXT property.