How to show different sections of a page depending on which day it

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a page containing information with 5 sections. It looks like this.

Monday
information ...

Tuesday
information..

etc..

The information is long so when it is friday, users have to scroll down to
friday.

When opening the page is it possible to jump directly to he section that is
related to the current day?

Thnx for any help
michael
 
Only if you create a bookmark for Friday, and then provide a link to the page/bookmark.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Why not make a separate page for each day?
 
The information has to be one page because it is gonna be printed together.

Yes, I know that I need to use a bookmark but somehow I need to have a logic
that decides which bookmark to jump to depending on which day it is.

Any heöp?

Thnx
 
Then this would need to be done with a server-side script, such as ASP, ASP.net, PHP, etc. I
answered a question similar to this with sample ASP code sometime over the past 3 weeks. So you will
need to do a search of the newsgroup. I don't recall the subject.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Hi Michael,

Javascript would probably be the easiest way, just stick this script at the
end of your page (just before </body>) and make bookmarks for each day,
Sunday, Monday Tuesday etc.

<script type="text/javascript">
var days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday',
'Friday', 'Saturday');
var d = new Date();
location.href = location.href + '#' + days[d.getDay()];
</script>
 
Thnx very much Jon, it worked perfectly.

Michael

Jon Spivey said:
Hi Michael,

Javascript would probably be the easiest way, just stick this script at the
end of your page (just before </body>) and make bookmarks for each day,
Sunday, Monday Tuesday etc.

<script type="text/javascript">
var days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday',
'Friday', 'Saturday');
var d = new Date();
location.href = location.href + '#' + days[d.getDay()];
</script>

--
Cheers,
Jon
Microsoft MVP


Michael said:
The information has to be one page because it is gonna be printed
together.

Yes, I know that I need to use a bookmark but somehow I need to have a
logic
that decides which bookmark to jump to depending on which day it is.

Any heöp?

Thnx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top