Forum Moderators: open

Message Too Old, No Replies

load pages based on time of day @ user

         

nobis77

5:49 pm on Nov 1, 2007 (gmt 0)

10+ Year Member



I want to be able to have someone arrive at a page and be automatically taken to another based on the time of day at their location.

I know this is probably something that is sorta covered elesewhere,and I appologize for that, but I've been plinking at this for days and getting nowhere by trying to modify the suggestions of other forum posts to somewhat similar questions. I figured it was just time to ask for exactly what I need. Please keep in mind that I'm a complete newbie.

Thanks.

rocknbil

8:11 pm on Nov 1, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard nobis77, I would suggest you look up some sort of server-side programming to make this happen, such as perl, php, or asp. It will be much more reliable and not Javascript - dependent.

However, you have a bit of an issue with at their location and their time. This is going to require some bits from the browser, which you can probably only get with Javascript.

I would suggest on first visit, you use JS to gather this info and set a cookie. The cookie would contain the location and the offset in time between your server and their time. Then on subsequent visits, your server-side programming could read the cookie and properly feed them the page.

Of course, always provide an alternate output if none of that works. :-)

nobis77

12:40 pm on Nov 2, 2007 (gmt 0)

10+ Year Member



Thanks for the suggestions. As soon as I master html I'll start plinking with the big guns <;)

For now Could you help me out with the javascript to change pages based on the server's time (or whatever time new Date()---getHours() retrieves). I'll settle for a dynamic site while I figure out how to tailor it to individual users.

Thanks again