Solved

Calender

Posted on 1998-12-07
8
343 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

911 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

24 Experts available now in Live!

Get 1:1 Help Now