PC Review


Reply
Thread Tools Rate Thread

Automatic data update to another page?

 
 
Finn Orvin
Guest
Posts: n/a
 
      19th Oct 2003
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.
 
Reply With Quote
 
 
 
 
Jim Buyens
Guest
Posts: n/a
 
      19th Oct 2003
>-----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) ||
|/----------------------------------------------------\|
*------------------------------------------------------*



 
Reply With Quote
 
Finn Orvin
Guest
Posts: n/a
 
      22nd Oct 2003
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

>-----Original Message-----
>>-----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) ||
>|/----------------------------------------------------\|
>*------------------------------------------------------*
>
>
>
>.
>

 
Reply With Quote
 
Jim Buyens
Guest
Posts: n/a
 
      23rd Oct 2003
"Finn Orvin" <(E-Mail Removed)> wrote in message news:<05b401c3985b$93d6a730$(E-Mail Removed)>...
> 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) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot update, the automatic update is not in services.msc and saysit is when try to install receive this error when trying to automatic update Cornholis Windows XP Basics 2 27th Aug 2011 06:59 AM
Automatic Data Update Kanmi Microsoft Excel Programming 0 30th Jun 2009 09:34 PM
Automatic redirect to MS update page. =?Utf-8?B?QyBU?= Windows XP General 3 9th Nov 2005 06:44 AM
Page number links with automatic update =?Utf-8?B?TWFubmZyZWQ=?= Microsoft Word Document Management 2 1st Sep 2004 05:06 PM
Automatic update of text box on Data Access Page James Microsoft Access 0 24th Feb 2004 04:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:02 PM.