I am trying to include the Calendar ActiveX control on a web page. I want to then display a subsequent page based on the date selected by the user.
I can display it using the <OBJECT> tag, but I want to create the control using ASP via the Server.CreateObject method and then display the control on the page.
This is how I am trying to do it: -
<%
Option Explicit
Dim objCal, caldate
Set objCal=Server.CreateObject("MSCAL.Calendar"
%>
<SCRIPT LANGUAGE=vbscript>
Option Explicit
Sub objCal_AfterUpdate( )
<%caldate=objCal.Value%>
viewer.document.location.href = "displaypage.asp?name=<%=caldate%>"
End Sub
</SCRIPT>
<object classid="clsid:8E27C92B-1264-101C-8A2F-040224009C02" id=<%=objCal%> width="288" height="192">
<param name="_Version" value="524288">
I have left out the rest of the <param name tags for clarity
</object>
In the next page I am using
gotdate = request.querystring("name"
to get hold of the date but surprise, surprise it is always empty. I have a feeling that I am not far off, but need a little inspiration.
Should I be using html to display the calendar as I have used the Server.CreateObject? Or should I be displaying it some other way? Is that ridiculous?
As you have probably realised I am a beginner!! So sorry if the solution is painfully obvious to you! I have looked all over the web and referred to many books but can't quite crack this one.
Thanks for the help in advance.
I can display it using the <OBJECT> tag, but I want to create the control using ASP via the Server.CreateObject method and then display the control on the page.
This is how I am trying to do it: -
<%
Option Explicit
Dim objCal, caldate
Set objCal=Server.CreateObject("MSCAL.Calendar"
%>
<SCRIPT LANGUAGE=vbscript>
Option Explicit
Sub objCal_AfterUpdate( )
<%caldate=objCal.Value%>
viewer.document.location.href = "displaypage.asp?name=<%=caldate%>"
End Sub
</SCRIPT>
<object classid="clsid:8E27C92B-1264-101C-8A2F-040224009C02" id=<%=objCal%> width="288" height="192">
<param name="_Version" value="524288">
I have left out the rest of the <param name tags for clarity
</object>
In the next page I am using
gotdate = request.querystring("name"
to get hold of the date but surprise, surprise it is always empty. I have a feeling that I am not far off, but need a little inspiration.
Should I be using html to display the calendar as I have used the Server.CreateObject? Or should I be displaying it some other way? Is that ridiculous?
As you have probably realised I am a beginner!! So sorry if the solution is painfully obvious to you! I have looked all over the web and referred to many books but can't quite crack this one.
Thanks for the help in advance.