Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Thanked 0 Times in 0 Posts

    Exclamation Display Last Modified date of ANY file even .xls files on a webserver

    Hello, have a website that contains many excel files (.xls and .zip). I need to display the last modified date of these files. They currently reside on a webserver. I found this script in this forum, BUT, it only seems to work for .htm or really anything else except .xls or .zip files.

    <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 = "Last Update: " + lastModif.toLocaleString();

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

    <iframe id="myIframe" onload="getLastMod()" src="DFC_new_page.htm" style="display:none;" width="352" height="137">


    Also, when I place an .xls file inside the src= field it ends up opening the file.

    HELP!!!! I am new to writing scripts and unfortunately only have Frontpage to use for this. Thank you!!!!!

  2. #2
    Regular Coder
    Join Date
    Nov 2009
    Thanked 22 Times in 22 Posts

  3. #3
    New to the CF scene
    Join Date
    Oct 2015
    Thanked 0 Times in 0 Posts
    Hello i am trying to use this code with doc file extension and the date and time i see is from html document and not from the source file. Also the word file every time i refresh the html page opens.
    I do not have server only html pages and javascript. With txt files is works smoothly.
    Have you any idea how to fix it?


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts