SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    I am having a problem with the "page update" script near the bottom of the page.

    It is written in JavaScript. It shows properly in IE but not in NS 4.76 or 6.0. I cannot understand what the problem is. I have tested 4 scripts and this happens with each one.

    On one page I placed an "update page" script directly on the page,
    http://www.ironstone.f2s.com/final3.shtml

    On another page I placed the same "update page" script by using SSI
    http://www.ironstone.f2s.com/final4.shtml

    The same thing happened on each page when I used IE, NS4.76 and NS6.0.

    Cannot understand what is going on.

    My basic questions are these[list=1][*]Why will the date and time not show correctly in NS for the "update page" script??[*]Is there another script I can use which will not cause this problem??[/list=1]

    Any and all input and responses appreciated.

    WP
    Webbing Along!!!

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Client side technologies are way too buggy accross platforms that is why you are having difficulty. Do you have ant sevrerside technologies running that you can use. IE PHP if so and it is PHP4 you can simpy use
    PHP Code:
    <?="This Page last updated ".date("m/d/Y g:i:s"filemtime($SCRIPT_FILENAME))?>
    IF its php3

    PHP Code:
    <?
    print "This Page last updated ".date("m/d/Y g:i:s"filemtime($SCRIPT_FILENAME));
    ?>
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    I believe you have my stapler. scrubz's Avatar
    Join Date
    Feb 2001
    Location
    Van down by the river
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out the explanation at the very bottom of this page:

    http://developer.irt.org/script/1037.htm

    Could this be your issue?

  4. #4
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Thanks for responding.

    The code I am using is the following,
    Code:
    <script>
    <!--//hide
    document.write(document.lastModified);
    //end hide-->
    </script>
    I cannot figure out if that is my problem or not. I am limited in JavaScript knowledge.

    WP
    Webbing Along!!!

  5. #5
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    WP1

    I am pretty sure that NN doesn't support the document.lastModified object. That is why I provided a cross-browser server-sdie solution. If this is not an option then there are certianly other ways. But I am pretty sure that you can't rely on document.lastModified and have it work in all browsers.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  6. #6
    ********* Addict WP1's Avatar
    Join Date
    Aug 2000
    Location
    New York , USA
    Posts
    407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi freddydoesphp,

    Appreciate your response.

    I put the pHp code into the page but all I got back when I loaded the page was a thin line where the "Page Update" should have been.

    Freedom2Surf has PHP 4 version 4.0.3pl1 installed.

    I tried both the scripts you suggested for PHP4 and PHP3. This is the script I included it in.

    For PHP 4
    Code:
    <CENTER>
    <!--  BEGIN MID TABLE -- Update -->
    <TABLE  width="400" border="0" cellpadding="0" cellspacing="0">
    <TR>
    <td COLSPAN="5" ALIGN="center" BGCOLOR="#A37951">
    <?="This Page last updated ".date("m/d/Y g:i:s", filemtime($SCRIPT_FILENAME))?>
    </td>
    </TR>
    <TR>
    <td COLSPAN="5" ALIGN="center" HEIGHT="3"></td>
    </TR>
    </TABLE>
    <!--  BEGIN MID TABLE -- Update -->
    </CENTER>
    For PHP 3
    Code:
    <CENTER>
    <!--  BEGIN MID TABLE -- Update -->
    <TABLE  width="400" border="0" cellpadding="0" cellspacing="0">
    <TR>
    <td COLSPAN="5" ALIGN="center" BGCOLOR="#A37951">
    <?
    print "This Page last updated ".date("m/d/Y g:i:s", filemtime($SCRIPT_FILENAME));
    ?>
    </td>
    </TR>
    <TR>
    <td COLSPAN="5" ALIGN="center" HEIGHT="3"></td>
    </TR>
    </TABLE>
    <!--  BEGIN MID TABLE -- Update -->
    </CENTER>
    Any additional Help or Suggestions you can give me will be appreciated.

    WP
    Webbing Along!!!


Bookmarks

Posting Permissions

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