Getting properties of another file(ex.HTML)?

This is a discussion on "Getting properties of another file(ex.HTML)?" within the JavaScript Forum section. This forum, and the thread "Getting properties of another file(ex.HTML)? are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 2nd, 2007, 18:23
New Member
Join Date: May 2007
Location: Novi Sad
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Getting properties of another file(ex.HTML)?

Hi, I have a question.
I want in one HTML page(first.html) to display some properties, for example date of last modification or file size of another file(second.html)

With document.lastModified and document.fileSize I can get properties of current-first.html file...but can I do that for second.html?
Maybe by giving path/filename of that second file...?
Lets say both files are in the same directory.

I have found some code that works for iframe, displaying properties of its content window. But I would like some general way of getting those other file properties, not just with iframes and their contents. Anyway, here's the mentioned code-original, i tried to change it to work my way, but getting null value when copying script to a <td> of a table:

<html>
<head>
<title>Last Modified</title>
<script type="text/javascript">
function getLastMod(){
var myFrm = document.getElementById('myIframe');
var lastModif = new Date(myFrm.contentWindow.document.lastModified);
document.getElementById('LastModified').innerHTML = "Prices correct as at: " +
lastModif.toLocaleString();
}
</script>
</head>

<body>
<span id="LastModified"></span>

<iframe id="myIframe" onload=getLastMod() src="prices.html" style="display:none;">
</iframe>

</body>
</html>

Thanx in advance.
Marko
Reply With Quote

  #2 (permalink)  
Old May 3rd, 2007, 06:48
Ryan Fait's Avatar
SuperMember

SuperMember
Join Date: May 2006
Location: Las Vegas
Posts: 3,786
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Getting properties of another file(ex.HTML)?

I don't think it's possible, but I'm not a JS expert...
Reply With Quote
  #3 (permalink)  
Old May 3rd, 2007, 08:17
New Member
Join Date: May 2007
Location: Novi Sad
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Getting properties of another file(ex.HTML)?

Well if you try that code,just add some prices.html file, and it works for frame-content window situation.
Seems such a small difference to make it general...

Ideas, anyone?
Reply With Quote
Reply

Tags
another file properties, external file properties

Thread Tools

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 On

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I use a:hover within a html file (without the css file) heyo Web Page Design 2 Mar 5th, 2007 22:50
html file from flash bejamshi Web Page Design 9 Feb 4th, 2007 03:45
convert doc file to html in asp.net malarvizhi ASP.NET Forum 1 Nov 28th, 2005 16:04
swf not loading on html file Christom Flash & Multimedia Forum 2 Mar 31st, 2005 09:51
How make Word file same as html file in ASP humair Classic ASP 5 Sep 24th, 2003 14:35


All times are GMT. The time now is 19:12.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43