Using the Calendar ActiveX control in an HTMl form
-
Hello all, I am trying to put a calendar control in an html page and then allow the user to select a date and then when he submits the form I want to pass the selected date to my ASP script. I inserted the control using Visual Studiu 7 and it gave me this code :-
<OBJECT name="Calendar1" id="Calendar1" classid="clsid:8E27C92B-1264-101C-8A2F-040224009C02" >
<PARAM NAME="_Version" VALUE="524288">
<PARAM NAME="_ExtentX" VALUE="7620">
<PARAM NAME="_ExtentY" VALUE="5080">
<PARAM NAME="_StockProps" VALUE="1">
<PARAM NAME="BackColor" VALUE="-2147483633">
<PARAM NAME="Year" VALUE="2002">
<PARAM NAME="Month" VALUE="3">
<PARAM NAME="Day" VALUE="31">
<PARAM NAME="DayLength" VALUE="1">
<PARAM NAME="MonthLength" VALUE="1">
<PARAM NAME="DayFontColor" VALUE="0">
<PARAM NAME="FirstDay" VALUE="7">
<PARAM NAME="GridCellEffect" VALUE="1">
<PARAM NAME="GridFontColor" VALUE="10485760">
<PARAM NAME="GridLinesColor" VALUE="-2147483632">
<PARAM NAME="ShowDateSelectors" VALUE="-1">
<PARAM NAME="ShowDays" VALUE="-1">
<PARAM NAME="ShowHorizontalGrid" VALUE="-1">
<PARAM NAME="ShowTitle" VALUE="-1">
<PARAM NAME="ShowVerticalGrid" VALUE="-1">
<PARAM NAME="TitleFontColor" VALUE="10485760">
<PARAM NAME="ValueIsNull" VALUE="0">
</OBJECT>Now how do I pass it to my ASP. I tried get and post and nothing works :-( I tried this from a button's javascript handler and it gave me errors. The error was "Invalid Callee" :-
<script language="javascript">
function abc()
{
alert(Calendar1.Year);
}
</script>Can someone give me some pointers please? :(( Nish
:love:Has anyone seen my sig?:love:
-
Hello all, I am trying to put a calendar control in an html page and then allow the user to select a date and then when he submits the form I want to pass the selected date to my ASP script. I inserted the control using Visual Studiu 7 and it gave me this code :-
<OBJECT name="Calendar1" id="Calendar1" classid="clsid:8E27C92B-1264-101C-8A2F-040224009C02" >
<PARAM NAME="_Version" VALUE="524288">
<PARAM NAME="_ExtentX" VALUE="7620">
<PARAM NAME="_ExtentY" VALUE="5080">
<PARAM NAME="_StockProps" VALUE="1">
<PARAM NAME="BackColor" VALUE="-2147483633">
<PARAM NAME="Year" VALUE="2002">
<PARAM NAME="Month" VALUE="3">
<PARAM NAME="Day" VALUE="31">
<PARAM NAME="DayLength" VALUE="1">
<PARAM NAME="MonthLength" VALUE="1">
<PARAM NAME="DayFontColor" VALUE="0">
<PARAM NAME="FirstDay" VALUE="7">
<PARAM NAME="GridCellEffect" VALUE="1">
<PARAM NAME="GridFontColor" VALUE="10485760">
<PARAM NAME="GridLinesColor" VALUE="-2147483632">
<PARAM NAME="ShowDateSelectors" VALUE="-1">
<PARAM NAME="ShowDays" VALUE="-1">
<PARAM NAME="ShowHorizontalGrid" VALUE="-1">
<PARAM NAME="ShowTitle" VALUE="-1">
<PARAM NAME="ShowVerticalGrid" VALUE="-1">
<PARAM NAME="TitleFontColor" VALUE="10485760">
<PARAM NAME="ValueIsNull" VALUE="0">
</OBJECT>Now how do I pass it to my ASP. I tried get and post and nothing works :-( I tried this from a button's javascript handler and it gave me errors. The error was "Invalid Callee" :-
<script language="javascript">
function abc()
{
alert(Calendar1.Year);
}
</script>Can someone give me some pointers please? :(( Nish
:love:Has anyone seen my sig?:love:
Nish, I don't know if I got this right, but insert this after </object>:
Sub ShowYear()
MsgBox Calendar1.Year
End SubHTH Wanderley