I was wanting to use Javascript to detect the edit date on a series
of .jpg files, and return that date in the corresponding HTML page,
as in "Chart was last updated...". Does anyone know if this is
possible, and if so how I would go about it?
Many thanks
Graham 6 1316
On 29 Nov 2004 17:04:18 +1300, ho*****@rbnz.govt.nz wrote: I was wanting to use Javascript to detect the edit date on a series of .jpg files, and return that date in the corresponding HTML page, as in "Chart was last updated...". Does anyone know if this is possible, and if so how I would go about it?
I'm using a modified version of a script located at http://www.cgiscript.net/site_javascripts_date_time.htm to do it for
the page, it should be possible to do the same for a file.
--
Erik
JRS: In article <Xn*******************************@172.27.20.6>, dated
Mon, 29 Nov 2004 17:04:18, seen in news:comp.lang.javascript, ho*****@rbnz.govt.nz posted : I was wanting to use Javascript to detect the edit date on a series of .jpg files, and return that date in the corresponding HTML page, as in "Chart was last updated...". Does anyone know if this is possible, and if so how I would go about it?
If you use 32-bit Windows, and perhaps even if not, you can use
Javascript in WSH to get the dates and to edit the HTML page; that
answers your first question as stated.
To answer your intended question, I doubted it. Testing locally, I see
that document.images[0].fileCreatedDate does show me a date string
(not necessarily correct), so something like that *might* work on the
Web for images that have actually been fetched.
But for annotating links to images that might be fetched ...
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Dr John Stockton <sp**@merlyn.demon.co.uk> wrote in
news:3r**************@merlyn.demon.co.uk: I was wanting to use Javascript to detect the edit date on a series of .jpg files, and return that date in the corresponding HTML page, as in "Chart was last updated...". Does anyone know if this is possible, and if so how I would go about it?
If you use 32-bit Windows, and perhaps even if not, you can use Javascript in WSH to get the dates and to edit the HTML page; that answers your first question as stated.
To answer your intended question, I doubted it. Testing locally, I see that document.images[0].fileCreatedDate does show me a date string (not necessarily correct), so something like that *might* work on the Web for images that have actually been fetched.
Thanks for your reply - i'm a bit of a novice at this - are you able to
be more specific in terms of the possible code for referencing a jpeg? Thanks
again. ho*****@rbnz.govt.nz wrote in message news:<Xn*******************************@172.27.20. 6>... Dr John Stockton <sp**@merlyn.demon.co.uk> wrote in news:3r**************@merlyn.demon.co.uk:
I was wanting to use Javascript to detect the edit date on a series of .jpg files, and return that date in the corresponding HTML page, as in "Chart was last updated...". Does anyone know if this is possible, and if so how I would go about it?
If you use 32-bit Windows, and perhaps even if not, you can use Javascript in WSH to get the dates and to edit the HTML page; that answers your first question as stated.
To answer your intended question, I doubted it. Testing locally, I see that document.images[0].fileCreatedDate does show me a date string (not necessarily correct), so something like that *might* work on the Web for images that have actually been fetched.
Thanks for your reply - i'm a bit of a novice at this - are you able to be more specific in terms of the possible code for referencing a jpeg? Thanks again.
The properties you'd be interested in - fileModifiedDate /
fileUpdatedDate are generally, by specification, members of Document
objects, not Image objects. MSIE, naturally, breaks the pattern,
making these available client-side for pix as well.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>untitled</title>
<script type="text/javascript">
//<![CDATA[
onload = function()
{
var img = document.getElementById('foo');
var s1 = document.createTextNode('Last updated: ' +
(img.fileUpdatedDate || 'unknown'));
var s2 = document.createTextNode('Last modified: ' +
(img.fileModifiedDate || 'unknown'));
var d = document.getElementById('box');
d.appendChild(s1);
d.appendChild(document.createElement('hr'));
d.appendChild(s2);
}
//]]>
</script>
</head>
<body>
<div id="box" style="width:200px;font:14px monospace;">
<img id="foo" src="http://www.geocities.com/area51/rampart/4503/acon/banana.jpg"
/>
</div>
</body>
</html>
JRS: In article <Xn*******************************@172.27.20.6>, dated
Tue, 30 Nov 2004 13:01:09, seen in news:comp.lang.javascript, ho*****@rbnz.govt.nz posted : Dr John Stockton <sp**@merlyn.demon.co.uk> wrote in news:3r**************@merlyn.demon.co.uk:
I was wanting to use Javascript to detect the edit date on a series of .jpg files, and return that date in the corresponding HTML page, as in "Chart was last updated...". Does anyone know if this is possible, and if so how I would go about it?
If you use 32-bit Windows, and perhaps even if not, you can use Javascript in WSH to get the dates and to edit the HTML page; that answers your first question as stated.
To answer your intended question, I doubted it. Testing locally, I see that document.images[0].fileCreatedDate does show me a date string (not necessarily correct), so something like that *might* work on the Web for images that have actually been fetched.
Thanks for your reply - i'm a bit of a novice at this - are you able to be more specific in terms of the possible code for referencing a jpeg? Thanks again.
If I had known more, I would have written more.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
That's helpful, thanks very much! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: gboissiere |
last post by:
Hello 'contentEditable' gurus,
The example code below uses contentEditable to let the user edit the
<div> element directly in their browser. Works also using designMode
for the document.
...
|
by: Slingman |
last post by:
I see that mshtml has automatic url detection in edit mode. How can I extend
this to make it automatic hyperlink my own list of words?
|
by: ricky.agrawal |
last post by:
I'm really not sure how to go about this in Access. What I've created
is a table for each location. Those tables are identical in format but
different in information.
The tables are named after...
|
by: cooch17 |
last post by:
There are lots of ways to use javascript to embed the current
date/time in a page. But, what I would like to do is the following -
have a script pop up a box when the user hovers over a link,...
|
by: John Salerno |
last post by:
I figured my first step is to install the win32 extension, which I did,
but I can't seem to find any documentation for it. A couple of the links
on Mark Hammond's site don't seem to work.
...
| |
by: petermichaux |
last post by:
Hi,
I would like to display a message to Internet Explorer clients to
encorage them to get Firefox. Yes they may like Internet Explorer but
it is my site :)
http://www.explorerdestroyer.com/...
|
by: licombo |
last post by:
I am making a flash game which is similar to the classic game Asteroids. I am stuck in the final step of the game where I have to make the collision detection working before the whole game is...
|
by: origami.takarana |
last post by:
Intrusion Detection Strategies
-----------------------------------
Until now, we’ve primarily discussed monitoring in how it relates to
intrusion detection, but there’s more to an overall...
|
by: Conrad Lender |
last post by:
In a recent thread in this group, I said that in some cases object
detection and feature tests weren't sufficient in the development of
cross-browser applications, and that there were situations...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |