By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,776 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,776 IT Pros & Developers. It's quick & easy.

how do make my pages load automaitically

P: n/a


on my home page, there is a frame that serves as a timetable for each
day, i do i make this frame change automatically, assuming i have html
files for each day?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
kunle Balogun wrote:

on my home page, there is a frame that serves as a timetable for each
day, i do i make this frame change automatically, assuming i have html
files for each day?
You change it on the server with a dynamic variable as the source of the
frame. Barring that, you use Scripting to change the SRC attribute of
the frame tag based on the current date, and you name your pages
accordingly. Probably the simplest method would be a Julian type date
based on the current day of the year and the current year. Search the
comp.lang.javascript archives on how to do that.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


While you are at it, try getting a decent newsreader and a news feed
instead of that devCrap.com site.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #2

P: n/a
JRS: In article <EO********************@comcast.com>, dated Sat, 12 Mar
2005 18:12:58, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted :
Probably the simplest method would be a Julian type date
based on the current day of the year and the current year. Search the
comp.lang.javascript archives on how to do that.


That use of "Julian" is somewhat specific to the US computer industry;
the international standard term for that is "Ordinal Date". Julian Date
is rightly a daycount from Gregorian -4713-11-24 12:00:00 GMT.

If one has files for each day, the simplest is IMHO to name them as
YYYYMMDD (MMDD if the same files are used on the same date each year).

One should consider whether the change is to be at midnight user time,
midnight GMT (both easy) or at some other time.

with (new Date())
FrameNamePart = (getFullYear()*100 + getMonth() + 1)*100 + getDate()

will give user's YYYYMMDD.

Ordinal date is not quite so easy; I don't recall it being discussed
here recently, but reading the FAQ should help.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #3

P: n/a
Dr John Stockton wrote:
JRS: In article <EO********************@comcast.com>, dated Sat, 12 Mar
2005 18:12:58, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted :

Probably the simplest method would be a Julian type date
based on the current day of the year and the current year. Search the
comp.lang.javascript archives on how to do that.

That use of "Julian" is somewhat specific to the US computer industry;
the international standard term for that is "Ordinal Date". Julian Date
is rightly a daycount from Gregorian -4713-11-24 12:00:00 GMT.


Depends on which definition of "Julian" date you use, and how you
percieve the phrase "Julian *type*". Not a "Julian Date", but a "Julian
Type Date".
If one has files for each day, the simplest is IMHO to name them as
YYYYMMDD (MMDD if the same files are used on the same date each year).
If so inclined. But as long as the proper file can be determined for the
date, it doesn't matter.
One should consider whether the change is to be at midnight user time,
midnight GMT (both easy) or at some other time.
It doesn't matter, as long as it happens in a reasonable manner to the
OP. Perhaps the most *sensible* time would be midnight user time.
Ordinal date is not quite so easy; I don't recall it being discussed
here recently, but reading the FAQ should help.


"Ordinal Date", as you call it, wouldn't be that hard to determine, the
most difficult being Feb's days which is quite trivial.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #4

P: n/a
JRS: In article <8O********************@comcast.com>, dated Mon, 14 Mar
2005 21:18:22, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted :
Dr John Stockton wrote:
JRS: In article <EO********************@comcast.com>, dated Sat, 12 Mar
2005 18:12:58, seen in news:comp.lang.javascript, Randy Webb
<Hi************@aol.com> posted :

Probably the simplest method would be a Julian type date
based on the current day of the year and the current year. Search the
comp.lang.javascript archives on how to do that.

That use of "Julian" is somewhat specific to the US computer industry;
the international standard term for that is "Ordinal Date". Julian Date
is rightly a daycount from Gregorian -4713-11-24 12:00:00 GMT.


Depends on which definition of "Julian" date you use, and how you
percieve the phrase "Julian *type*". Not a "Julian Date", but a "Julian
Type Date".


It is safer not to introduce "Julian" in conjunction with YYYY-DDD or
similar; why perpetrate an IBMism that conflicts with long established
usage throughout the world? I know of no definition of "Julian type
date" as such; but one would expect it to apply to one of JD, MJD, CJD,
CMJD, and similar - a day-count from a single base date fixed in
"history".
If one has files for each day, the simplest is IMHO to name them as
YYYYMMDD (MMDD if the same files are used on the same date each year).


If so inclined. But as long as the proper file can be determined for the
date, it doesn't matter.


Except that the simplest is less likely to have errors in
implementation; the obvious way to determine ordinal date is be finding
the days difference between now and Jan 1st --- and we have recently
been provided by two posters of a demonstration of how not to do that.
One should consider whether the change is to be at midnight user time,
midnight GMT (both easy) or at some other time.


It doesn't matter, as long as it happens in a reasonable manner to the
OP. Perhaps the most *sensible* time would be midnight user time.


Indeed; the OP should, however, consider the matter. Some other
midnight *might* be more fitting.
Ordinal date is not quite so easy; I don't recall it being discussed
here recently, but reading the FAQ should help.

"Ordinal Date", as you call it, wouldn't be that hard to determine, the
most difficult being Feb's days which is quite trivial.


Perhaps you have forgotten what the FAQ says on the subject?

Ordinal Date, which is the term used in ISO 8601, can be calculated from
Y M D by taking the difference of Date.UTC of Y M D & Y 0 0 and
dividing; it can be calculated from a Date Object by noting valueOf(),
setting Month and Date to 0, subtracting, dividing, *and rounding*. No
need to bother explicitly with the length of each month at all. Or one
can avoid Date completely by (after Meeus; cf. Zeller) :
K = 2 - (Y%4==0) // 2 - Leap, 1901-2099
N = Math.floor(275*M/9) - K*(M>2) + D - 30

Nevertheless, a Y M D -based URL is easier, especially as the author
will probably want to know at sight what date each page is for. Though
Y W D might gave advantages, if one week tends to resemble another.

--
John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.