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.
|
|
|
|
|
![]() |
||
Getting properties of another file(ex.HTML)?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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 |
|
|
|
|||
|
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? |
![]() |
| Tags |
| another file properties, external file properties |
| Thread Tools | |
|
|
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 |