There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer black screen boot bsod computer connection crash css dell display driver drivers email error ethernet excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook express partition password printer problem router slow software sound trojan usb video virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Javascript - Future Dates listing script needed


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
googligoo's Avatar
Junior Member with 2 posts.
 
Join Date: Nov 2007
Experience: Intermediate
01-Nov-2007, 08:39 PM #1
Javascript - Future Dates listing script needed
I am currently redeveloping a webpage (.asp or .html). I need a script. I have looked and looked but to no avail, maybe I will be more lucky here.

The purpose of this script is to inform trainees when our trainers are visiting their town again to do some software support at their hospital. For 2 cities the frequency between visits is fortnightly for one it is monthly.

The script that I need should be able to do the following:
Say I entered as a reference starting date: 6th of November (06/11/2007).
I want a script that calculates every 2nd Tuesday (case 1 in one table row) and every 4th Tuesday (2nd and 3rd scenario in another row) from that date onwards. (Requirement 1).
(Requirement 2 Only the first 3 occurrences which must be either today or in the future I want to appear in my table cell. As soon as three dates are listed the script can finish for this row.

i.e.
Name of Town, Next 3 visits, Frequency of visits
Town 1, 06/11/2007, 20/11/2007, 04/12/2007 (Fortnightly)
Town 2 13/11/2007, 11/12/2007, 08/01/2007 (every four weeks)
Town 3 27/11/2007, 25/12/2007, 22/01/2007 (every four weeks)

So basically I want each of the three (Next 3 visits) tablecells to call one of three functions (each holding a different starting reference date and different interval (as I said, 1 will happen fortnightly, 2 will happen every four weeks) to do that calculation and then each to arrive at 3 dates only (that meet that criteria).

All past dates should be ignored - only todays and future dates are accepted to display, but no more than 3! in one cell.

What I want to be able to do is to just insert the reference dates and intervals in the functions once and leave the webpage untouched after that, since it keeps the table cells up-to-date from then on in.

This I'm sure can be done, but I wonder if someone could work out how.

I would be so grateful for all those who give this a try.

Best Regards,

Andreas
googligoo's Avatar
Junior Member with 2 posts.
 
Join Date: Nov 2007
Experience: Intermediate
02-Nov-2007, 05:33 PM #2
Found solution
Thanks guys,
Before anyone tries to help me out, just letting you know I have received a solution elsewhere, so no need to sit down and work this one out.

Best Regards,

Andreas
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:12 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.