codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Redirect DATE script  Grodis at 17:33 on Monday, February 16, 2004
 

Hi
I need help with a script that redirects a user to a "today.page".

I already have a calendar-function at
http://www.kocken.com/kalender

but i want to incorporate it on my main page http://www.kocken.com/default.asp where the scroller displays Todays events and greets Namesday-users.

Any ideas?

Björn

  Re: Redirect DATE script  Troy Wolf at 00:23 on Monday, February 23, 2004
 

Since your calendar is javascript, and I don't know if you are on an ASP or PHP or PERL-CGI, etc enabled server, a javascript solutions is probably your best bet. Check out the date functionality in javascript using this section of devguru.com.

http://www.devguru.com/Technologies/ecmascript/quickref/date.html

Using the javascript date methods, you can setup a page onload event that fires, gets today's date, then calls whatever methods your calendar script uses to select the current date.

To setup a page onload event, you can use this script inside your javascript section:


function LoadTrigger() {
// Insert statements to fire on load here.
alert("Page has loaded.");
// Now put some date logic here to get today's
// date, then build a call to your calendar to
// change it to today.
}
window.onload = LoadTrigger;
Troy Wolf: site expert
Shiny Solutions









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: onload event
•  Active Widgets
•  Re: onmouseover change image and text
•  Line Printer Interface
•  import contacts of msn/yahoo
•  Call windows apps from web apps
•  Re: ASP.NET web controls
•  netscape 6 browser problem
•  Re: Print .doc file from the website using System.Diagnostics.Process


Recent Articles
Communicating with the Database (Using ADO)
MagicGrid
Simple Thumbnail Browsing Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2005