Solved

Calender

Posted on 1998-12-07
8
341 Views
Last Modified: 2011-04-14
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.
0
Comment
Question by:lobos
  • 4
  • 3
8 Comments
 
LVL 2

Expert Comment

by:tschill120198
ID: 1092108
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.
0
 

Author Comment

by:lobos
ID: 1092109
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
0
 
LVL 2

Accepted Solution

by:
tschill120198 earned 50 total points
ID: 1092110
I'm assuming this means you have the value and can access it in the "click" event of the control.  If so, you should be able to call window.open (or document.location.href=) and pass the date value as a param.
0
 
LVL 1

Expert Comment

by:chicabow
ID: 1092111
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........
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 1

Expert Comment

by:chicabow
ID: 1092112
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........
0
 
LVL 2

Expert Comment

by:tschill120198
ID: 1092113

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") %>

0
 
LVL 1

Expert Comment

by:chicabow
ID: 1092114
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?


0
 
LVL 2

Expert Comment

by:tschill120198
ID: 1092115
The syntax is the same... just put the "document.location.href" script in the onClick event of the button.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now