Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Calender

Posted on 1998-12-07
8
Medium Priority
?
353 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 100 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
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

 
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
 
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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

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…
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how the fundamental information of how to create a table.

885 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