Link to home
Start Free TrialLog in
Avatar of lobos
lobos

asked on

Calender

I am trying to make an ASP page where it will display a calender like page.  It will display the calender for the existing month and the following 6 months.  I want it be updated.  Like how on each computer the system has the calender.  I want that type of idea.  My question is well I know how to display one calender day.  How do you display 6 months in advance and always have the date being updated for example when a new month starts its show the next 6 months.  Keeping in mind that the date is right including the leap year and the actually months that include 31 or 30 days.
Can this be coded in VBscript.  I know there are function for the date, but looks like there are only ones for one day not for a range.  I always want to have 6 months in advance on the page.
Please help ASAP.  Or point me to the right direction.
Avatar of tschill120198
tschill120198

It can all be done in VBScript, but you'll have to step through each day one at a time, changing rows when the day corresponds to the first day of a week, etc.

You really don't want to add the overhead of connecting to SQL, etc.
Avatar of lobos

ASKER

I will grant you the points but another question now ....
I have used the active x control to get a calender...so I wont need to code for all this one day at a time thing.  What I need to know is well I have this calender(activeX control) and any day you click on it I have an alert that shows what they clicked on.  I want to then hit a button which loads another ASP page that shows the day they clicked on.  But I cannot carry that value over...What am missing?
HELP ASAP
ASKER CERTIFIED SOLUTION
Avatar of tschill120198
tschill120198

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
How do you send it as a parameter that;s my problem.  I get the value, once they click I have an alert that shows the value.  So it's in a variable  called (tempnum) so now I want to go to another ASP pages and use this (tempnum) to look up information in a table...But I can get the variable to that page....You say send it as a parameter....HOw......What's the syntax.
I want to send it to a page called display.asp...
What is the proper syntax.
Session variables can't be used here can they?  Well if what you said about sending it as a parameter works then there is no need right?
Thanks....for the help...we are almost there........
How do you send it as a parameter that;s my problem.  I get the value, once they click I have an alert that shows the value.  So it's in a variable  called (tempnum) so now I want to go to another ASP pages and use this (tempnum) to look up information in a table...But I can get the variable to that page....You say send it as a parameter....HOw......What's the syntax.
I want to send it to a page called display.asp...
What is the proper syntax.
Session variables can't be used here can they?  Well if what you said about sending it as a parameter works then there is no need right?
Thanks....for the help...we are almost there........

Assuming display.asp is in the same directory as the current page, you could use something like:
    document.location.href = "display.asp?theDate=" & cStr(tempnum)
Then in display.asp you reference the value using
    <%= Request.QueryString("theDate") %>

Ok that's sounds reasonable, but that sounds like you are using a link.  I wanted to have a button that would load the new page and not a link.  So they click on a day then on the button that would load the new page.  Is the syntax for that different?


The syntax is the same... just put the "document.location.href" script in the onClick event of the button.