Automatic data update to another page?

  • Thread starter Thread starter Finn Orvin
  • Start date Start date
F

Finn Orvin

I'm using Frontpage 2000
Is there any way that a piece of data can automaticly
update to some of the other pages? Ie having a page updated
"date" automaticly show up on a couple of other pages
without opening them? In other words have the other pages
go to the original data on another page and post the most
recent data.
 
-----Original Message-----
I'm using Frontpage 2000
Is there any way that a piece of data can automaticly
update to some of the other pages? Ie having a page
updated "date" automaticly show up on a couple of other
pages without opening them?

You would have to write a bit of ASP or ASP.NET code for
this. For example, add this code to your <head> section:

<%
Dim fso
Set fso = Server.CreateObject
("Scripting.FileSystemObject")
Function FileDate(aURL)
Dim finfo
On Error Resume Next
Err.Clear
Set finfo = fso.GetFile(Server.MapPath(aURL))
If Err Then
FileDate = Err.Description
Else
FileDate = FormatDateTime(finfo.DateLastModified, _
vbLongDate)
End If
End Function
%>

And then add code like this wherever you'd like to
display another page's date of last update.

<%=FileDate("default.htm")%>

In place of default.htm, you can code any relative URL
you want. (Some hosts, however, won't allow URLs
containing "..")

Because this is ASP code, it will only work on Windows
servers. Furthermore, the page that contains the code
must have a filename extension of asp.

If you have a Unix host, you'd have to write something
similar in PHP, Perl, J2EE, or whatever the host supports.
In other words have the other pages go to the original
data on another page and post the most recent data.

You switched from "date" to "data" here. If you really
mean "data", the answer depends greatly on what kind of
data and what you want to do with it. To get a useful
answer, please provide more detail on what you're trying
to accomplish.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
HI Jim
Thanks for responding.
My web page is on a Sun Solaris Unix server.

I have on a "page updated on date" script on one of the
pages. I would like the date to show up on a couple of
other pages which links to the current "updated" page.

Sincerely
Finn Orvin
 
Finn Orvin said:
HI Jim
Thanks for responding.
My web page is on a Sun Solaris Unix server.

I have on a "page updated on date" script on one of the
pages. I would like the date to show up on a couple of
other pages which links to the current "updated" page.

If the script that shows the "updated" date for the current
page runs on the server, you can probably modify it to show
the date updated for other pages as well. It's more likely,
however, that your script runs entirely on the browser and
displays the document.lastModified property. Unfortunately,
this property is only available for the current pages.

To get the date for another page on a Unix server, you'd
have to write or find some code that gets the file date
from the server's file system. This would typically be
something written in PHP, JSP, JEW, or Perl.

Unfortunately, I have no sample code for such a thing.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
Back
Top