There are plenty of scripts that load html into a page based on the
day of the week, month, or randomly, but I would like to load a
different page every day of the year.
I would like to give a script a list of 365 html pages and have it
load a new one into that page each day
Thanks in advance 10 2218
On Nov 12, 12:33 am, nico...@sympatico.ca wrote:
There are plenty of scripts that load html into a page based on the
day of the week, month, or randomly, but I would like to load a
different page every day of the year.
I would like to give a script a list of 365 html pages and have it
load a new one into that page each day
Thanks in advance
What did you try yet. Come on, do something we can help you with, it's
not
that we are just waiting here for tasks to do. People can help, but it
shouldn't
be expected they do everything for you.
Cheers
On 11 Nov, 20:59, Darko <darko.maksimo...@gmail.comwrote:
On Nov 12, 12:33 am, nico...@sympatico.ca wrote:
There are plenty of scripts that load html into a page based on the
day of the week, month, or randomly, but I would like to load a
different page every day of the year.
I would like to give a script a list of 365 html pages and have it
load a new one into that page each day
Thanks in advance
What did you try yet. Come on, do something we can help you with, it's
not
that we are just waiting here for tasks to do. People can help, but it
shouldn't
be expected they do everything for you.
Cheers
Hi Darko,
You don't have to do anything at all and I really don't expect anyone
to do anything. I was just hoping that someone would read this and
know where I can find such a sript, perhaps they were in the same
situation that I'm in. I could have written down all the urls of the
search results I read through, but I didn't think that would help. ni*****@sympatico.ca said the following on 11/11/2007 10:25 PM:
On 11 Nov, 20:59, Darko <darko.maksimo...@gmail.comwrote:
>On Nov 12, 12:33 am, nico...@sympatico.ca wrote:
>>There are plenty of scripts that load html into a page based on the day of the week, month, or randomly, but I would like to load a different page every day of the year. I would like to give a script a list of 365 html pages and have it load a new one into that page each day
That will break on Feb 29th every four years.
>>Thanks in advance
What did you try yet. Come on, do something we can help you with, it's not that we are just waiting here for tasks to do. People can help, but it shouldn't be expected they do everything for you.
Cheers
Hi Darko,
You don't have to do anything at all and I really don't expect anyone
to do anything. I was just hoping that someone would read this and
know where I can find such a sript, perhaps they were in the same
situation that I'm in. I could have written down all the urls of the
search results I read through, but I didn't think that would help.
I doubt you are going to find a ready made script for it. The simplest
way is to name all your files by the date. Use zero based month numbers
as that is what JS uses and it makes it simpler. Use getMonth() to give
you the month number, getDate() to give you the day of the month.
dayOfMonth = new Date().getDate()
monthOfYear = new Date().getMonth()
Now, you can follow Darko's advice. Give it a try, post your best attempt.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
On 11 Nov, 23:55, Randy Webb <HikksNotAtH...@aol.comwrote:
nico...@sympatico.ca said the following on 11/11/2007 10:25 PM:
On 11 Nov, 20:59, Darko <darko.maksimo...@gmail.comwrote:
On Nov 12, 12:33 am, nico...@sympatico.ca wrote:
>There are plenty of scripts that load html into a page based on the day of the week, month, or randomly, but I would like to load a different page every day of the year. I would like to give a script a list of 365 html pages and have it load a new one into that page each day
That will break on Feb 29th every four years.
>Thanks in advance
What did you try yet. Come on, do something we can help you with, it's
not
that we are just waiting here for tasks to do. People can help, but it
shouldn't
be expected they do everything for you.
Cheers
Hi Darko,
You don't have to do anything at all and I really don't expect anyone
to do anything. I was just hoping that someone would read this and
know where I can find such a sript, perhaps they were in the same
situation that I'm in. I could have written down all the urls of the
search results I read through, but I didn't think that would help.
I doubt you are going to find a ready made script for it. The simplest
way is to name all your files by the date. Use zero based month numbers
as that is what JS uses and it makes it simpler. Use getMonth() to give
you the month number, getDate() to give you the day of the month.
dayOfMonth = new Date().getDate()
monthOfYear = new Date().getMonth()
Now, you can follow Darko's advice. Give it a try, post your best attempt.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -http://jibbering.com/faq/index.html
Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/
Thanks Randy,
I hadn't thought of leap years. I was imagining that it would just
skip the last days of February in those years; which wouldn't matter
to me. Not every page has to be seen every year, the important part is
that a page is not repeated in a year.
Randy Webb wrote:
ni*****@sympatico.ca said the following on 11/11/2007 10:25 PM:
>On 11 Nov, 20:59, Darko <darko.maksimo...@gmail.comwrote:
>>On Nov 12, 12:33 am, nico...@sympatico.ca wrote:
There are plenty of scripts that load html into a page based on the day of the week, month, or randomly, but I would like to load a different page every day of the year. I would like to give a script a list of 365 html pages and have it load a new one into that page each day
That will break on Feb 29th every four years.
It will break in every leap year, which is not always every four years.
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
In comp.lang.javascript message <11**********************@c30g2000hsa.go
oglegroups.com>, Sun, 11 Nov 2007 15:33:15, ni*****@sympatico.ca posted:
>There are plenty of scripts that load html into a page based on the day of the week, month, or randomly, but I would like to load a different page every day of the year.
I would like to give a script a list of 365 html pages and have it load a new one into that page each day
You'll have a problem next year, then.
Name the pages xxx1MMDD.htm, where xxx is anything reasonable, 1 is one,
MM is natural month, DD is day-of-month.
D = new Date()
Name = "xxx" + (10100 + D.getMonth()*100 + D.getDate()) + ".htm"
location.href = Name
Partially tested.
Uses local date.
It's a good idea to read the newsgroup c.l.j and its FAQ. See below.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Thomas 'PointedEars' Lahn meinte:
Randy Webb wrote:
>That will break on Feb 29th every four years.
It will break in every leap year, which is not always every four years.
In won't make a difference in real life - given the year of the next
"exception"...
Gregor
-- http://www.gregorkofler.at ::: Landschafts- und Reisefotografie http://www.licht-blick.at ::: Forum für Multivisionsvorträge http://www.image2d.com ::: Bildagentur für den alpinen Raum
Gregor Kofler said the following on 11/12/2007 1:55 PM:
Thomas 'PointedEars' Lahn meinte:
>Randy Webb wrote:
>>That will break on Feb 29th every four years.
It will break in every leap year, which is not always every four years.
In won't make a difference in real life - given the year of the next
"exception"...
Precisely :)
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
In comp.lang.javascript message <11**********************@o38g2000hse.go
oglegroups.com>, Mon, 12 Nov 2007 03:59:05, ni*****@sympatico.ca posted:
> I hadn't thought of leap years. I was imagining that it would just skip the last days of February in those years; which wouldn't matter to me. Not every page has to be seen every year, the important part is that a page is not repeated in a year.
But it is, presumably, moderately important that the script behaves
without ostensible error on every day of every year, including when
there are 366 of them.
You did not actually say whether or not the same page should be shown on
the same "Gregorian" or ordinal date each year.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6.
Web <URL:http://www.merlyn.demon.co.uk/- w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/- see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Dr J R Stockton wrote:
[]
>
There's no need to go that route in full for DoY :
function XDoY() { with (new Date()) {
var Y = getFullYear(), M = getMonth(), D = getDate() }
return 1001 + (Date.UTC(Y, M, D) - Date.UTC(Y, 0, 1))/864e5 }
This returns: 1307 (Saf2, FF2 Mac).
Is that what you are looking for?
Mick This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Henry Hartley |
last post by:
I've got a PHP system working on a development server (Windows
2000/IIS5/PHP 4.3.3) but it doesn't seem to be working quite right on
the testing server (same except PHP 4.2.3). I upgraded the PHP...
|
by: Chris |
last post by:
Hi,
I am wondering where in my ASP.NET application to load a dropdown list box
that
basically only changes once a year.
I load a drop down list box with about 40 locations. If it never...
|
by: Ravi Ambros Wallau |
last post by:
Hi:
We developed a set of ASP.NET Web Applications that never runs in
stand-alone mode, but always inside a portal (Rainbow Portal). All modules
are copied on that portal.
My question is: load...
|
by: billcute |
last post by:
I have a form (frmSewer) which bounded to tblSewer. The code at the On Load Event is designed to open frmSewer is appropriate date is updated into tblFilingdatesat the end of each quarter.
In...
|
by: dean.h.brown |
last post by:
How do you get the Calendar date when the page first loads?
I have this code (which works once the user selects a date) - I get
"12:00:00 AM" for the label.text when the page first loads:
...
|
by: owz |
last post by:
I am trying 2 load details about cars from a.txt file
and then display the total stock value off all cars.
public class Car
{
// attributes
private String manufacturer;
private...
|
by: hemantbasva |
last post by:
We have designed an aspx page having five ajax tab in it. the data of first four are designed on page whereas for the fifth tab it renders a user control named MYDOMAIN. in the tab container's even...
|
by: pankajsingh5k |
last post by:
Dear All,
Please help me...
I had read an article to lazy load a tab in a tabcontainer using an update panel on
http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html
...
|
by: ghjk |
last post by:
I store images using one of my web pages. Next I want to load image from the db and pass the value to ajax page. Other values got correctly. But didn't get image.This is my code.
php page. When...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |