Results 1 to 4 of 4
11-08-2003, 07:36 PM #1
An ideal Script idea...for a newbie...
Here is an idea I thought would I would like to see move from being an idea...
A strange script if there ever was one, but could be used for many purposes, once it was available.
1. It would reference a browsers time/date.
2. At the appointed time it would show a page with a message, based on that time. (anything could be on that page).
3. It would do and keep doing this for any duration/length of time, say one hour, two hours, (half or portions of hours are not necessary, but would be good as I would see the code logic...and learn from it)
4. It w/could do this any amount of times per 24 hour period, which means that w/could be easily configurable for any amount of time and for any length/duration of that time...
The idea is a browser would get the right and appropriate message, depending on his time zone....and only he would see that message...even though many browsers were indeed on the site/page at the time.
I have been learning some basic scripting from the help I get on this site, and have come to believe, that scripting is an excellent achievement, comparable with any high science...and the effects are magical...
So will someone please tell me if my ideal script is achieveble by some high scientist with magical skills....LOL....?
I saw script recently that I am remembering....that does a similar thing...or close.
I think it tells good morning or good afternoon....that is the idea, except this ideal script would do it not twice, but a (x)number of times, and show a page as well, a different page for each time period sellected.
Thanx for any response...
11-08-2003, 08:06 PM #2The idea is a browser would get the right and appropriate message, depending on his time zone....and only he would see that message...even though many browsers were indeed on the site/page at the time.
11-08-2003, 08:19 PM #3
You know I was hanging around right...Thanx.
OK, here is what I think...
It would have to be a client-side operation for each (call that newbie-think)browser to have his experience at the time of the script.
You see the script on the site would have one single set of code...(dunno if I said that properly), which would be interpreted by the browser depending on his time zone...hmmm
Not sure I said that right either.
OK I am still thinking....
I am actually doing that now, and hope to find them and post them in a little while....
Thanx for your response...I am still thinking!
Last edited by wahid; 11-09-2003 at 01:14 AM.
11-08-2003, 08:43 PM #4
OK here are both scripts....
Not sure how they would help, but it is a start...
It sure helped to think about this script, or some may say dumb script...LOL.
<!-- TWO STEPS TO INSTALL AUDIO GREETING:
1. Copy the coding into the HEAD of your HTML document
2. Create a separate file called "AudioGreeting.js" and put this code into it. -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<!-- This script and many more are available free online at -->
<!-- Original: Happy Smart -->
<!-- Web Site: http://happysmart.net -->
<!-- STEP TWO: Create a separate file called "AudioGreeting.js" and put this code into it. -->
var d = new Date()
var h = d.getHours()
//You can record your own audio greeting and customize the greeting time and message
if (h < 12) document.write('<bgsound SRC="Goodmorning.wav" AUTOSTART=true LOOP=1>'+'Good morning!')
else if (h < 17) document.write('<bgsound SRC="Goodafternoon.wav" AUTOSTART=true LOOP=1>'+'Good afternoon!')
else if (h < 24) document.write('<bgsound SRC="Goodevening.wav" AUTOSTART=true LOOP=1>'+'Good evening!')
<!-- Script Size: 1.18 KB -->
Here is the other
datetoday = new Date();
thehour = datetoday.getHours();
if (thehour > 18) display = "Evening";
else if (thehour >12) display = "Afternoon";
else display = "Morning";
var greeting = ("Good " + display + "!");
// End -->
Thanx for any assistance possible...