Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display modification date of another document

Status
Not open for further replies.

LaPuce

Programmer
Oct 14, 2004
3
CA
Hi!

Is there a way to display, on a given .asp page, the modification date of a database, as it is displayed on the web server?

I explain myself. The human ressources of my organization have a database in which they keep track of the people. Once in a while, they transfer this database on the Web server. I have a Web page (.asp) that display the list of people dynamically from this database. I want the modification date of my Web page to be the same as the modification date of the database on the Web server.

First problem, I can't modify the original database adding a "last modification" field...

Is there a way to retrieve that modification date in javascript???

Thanks!
 
Javascript cannot interact with a database. You will need a server-side language (you mentioned ASP) to pass the value first.

Does that answer your question?

--Chessbot

"So it goes."
Kurt Vonnegut, Slaughterhouse Five
 
Okay, I understand. In fact, I just want to be more precise (I'm not sure I explain myself clearly cause English is not my first language), it doesn't matter that it is a database or an image or a word document, I just need to retrieve the last modification date of the document as it is stored on the Web server and display that date on my page...

So what you're telling me is that javascript can't do that, is that right? Do you know of a source of information that could help me? On my side, I will search google for "passing server-side value", or something like it :)

Thank you very much for your time!

La Puce
 
Here is an example of what I mean (in ASP):

Code:
<%

Dim strTime

strTime = "time" 
' That is the time you retrieved from your database.
%>

<html>
<head>
<title>Blank</title>
<script type="text/javascript">
alert("<%= strTime %>");
</script>
</head>
</html>

You can use Javascript to display the information (alert it, in this case) but you can only use a server-side language for retrieval.


--Chessbot

"So it goes."
Kurt Vonnegut, Slaughterhouse Five
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top