How do I....

  • Thread starter Thread starter samh
  • Start date Start date
S

samh

Please I will make a web and everyday will be a new news this is mean that I
will have a 30 pages per month. What I need is to make archiving just to
choose the date (DAY-MONTH-YEAR) to find out any old news from old dates. So
please I need some help how Can I do it?
Thanks
 
I'd make a folder for 2005, then in that 12 folders - one for each month,
then in those you'd have your daily pages.

There probably are better ways to do this...maybe with a db.
 
I made a mistake in my description I'm sorry. I need to make a script or so
I don't know to let over the web the visitor choose the date that he needs
to read the news of it and from this point the web take him to open this
page which he pointed to it by choosing the date from the script
 
Name your archive pages by date, and for convenience store in folders
for year and month-
so the archive for 13 January 2005 will be stored at
www.example.com/2005/01/13.htm

Create a new page that lets your visitor access the archives and place
a form:
<form onsubmit="getarchive();return false">
<p>Enter date: dd/mm/yyyy <input type="text" name="Day"
size="2">&nbsp;/ <input type="text" name="Month" size="2">&nbsp;/
<input type="text" name="Year" size="4"></p>
<p><input type="submit" value="Go"></p>
<script type="text/javascript">
function getarchive() {
var d = document.forms[0]
var loc = d.Year.value + "/" + d.Month.value + "/" + d.Day.value +
".htm"
document.location.href = loc
}
</script>

The above snippet contains no error checking - a better method will be
to use drop downs for Day, Month and Year, and provide error pages
for invalid dates, like 30 February.
 
The code snippet below requires </form> at the end.

</script
</form>

--
Ron Symonds
Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

Ronx said:
Name your archive pages by date, and for convenience store in
folders for year and month-
so the archive for 13 January 2005 will be stored at
www.example.com/2005/01/13.htm

Create a new page that lets your visitor access the archives and
place a form:
<form onsubmit="getarchive();return false">
<p>Enter date: dd/mm/yyyy <input type="text" name="Day"
size="2">&nbsp;/ <input type="text" name="Month" size="2">&nbsp;/
<input type="text" name="Year" size="4"></p>
<p><input type="submit" value="Go"></p>
<script type="text/javascript">
function getarchive() {
var d = document.forms[0]
var loc = d.Year.value + "/" + d.Month.value + "/" + d.Day.value +
".htm"
document.location.href = loc
}
</script>

The above snippet contains no error checking - a better method will
be to use drop downs for Day, Month and Year, and provide error
pages for invalid dates, like 30 February.
--
Ron Symonds
Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

samh said:
I made a mistake in my description I'm sorry. I need to make a
script or so I don't know to let over the web the visitor choose the
date that he needs to read the news of it and from this point the
web take him to open this page which he pointed to it by choosing
the date from the script
 
Back
Top