Need some sort of html text updater...

Discussion in 'OT Technology' started by Alt+F4, Nov 16, 2004.

  1. Alt+F4

    Alt+F4 official OT hockey stud

    Joined:
    Dec 13, 2001
    Messages:
    3,790
    Likes Received:
    0
    Location:
    Manchester, NH
    I work for a school district, and one of the 90 year old bosses here wants to have an "emergency instruction page" so when one of the schools blow up, all the parents can calmly log onto our website and get updated info on where to identify their kids remains. You can tell I'm enthusiastic about this.

    The page itself is very simple, but at the top he wants it to say:

    "Last updated Monday, November 15, 2004 - 7:14am"

    Even though there's no info on the page at all. So gay. I just need something that'll change the date and time on the page so I don't have to remember it every fuck day. Is there such a thing? I can't really code other than html, but there's gotta be a javascript out there somewhere...
     
  2. IAMwhitey

    IAMwhitey New Member

    Joined:
    Nov 8, 2001
    Messages:
    1,010
    Likes Received:
    0
    Location:
    Pittsburgh, PA
    what kind of server? can you run ASP or PHP?
     
  3. Alt+F4

    Alt+F4 official OT hockey stud

    Joined:
    Dec 13, 2001
    Messages:
    3,790
    Likes Received:
    0
    Location:
    Manchester, NH
    It's an old NT4 server I inherited, to be replaced with a 2k3 server next summer. I honestly have no idea which extensions are installed, and I'm unfamiliar with IIS...let me see if I can figure it out.
     
  4. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,918
    Likes Received:
    10
    Location:
    Los Angeles
    <script language="JavaScript">
    <!--
    document.write('Last updated ' + document.lastModified);
    //-->
    </script>
     
  5. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    that requires him to update the page, tho.

    Nt4 should support ASP with no problems.
     
  6. Alt+F4

    Alt+F4 official OT hockey stud

    Joined:
    Dec 13, 2001
    Messages:
    3,790
    Likes Received:
    0
    Location:
    Manchester, NH
    Did I mention I have never scripted anything, and I have no idea wtf that is kingtoad :)
     
  7. WERUreo

    WERUreo Imua!

    Joined:
    Oct 15, 2003
    Messages:
    566
    Likes Received:
    0
    Location:
    Daytona Beach, Florida
    If that page isn't going to be updated that often, why not just hand code it? If it's a page that will be updated often, I don't see why the function kingtoad put up wouldn't work just fine. If the idea is to let people know when the document was last updated, that's exactly what that function does. Yeah, so he has to update the document. But isn't that the point? I don't see why he would need to install ASP to do something as simple as that.

    Alt+F4, you don't need to know anything about coding. Just insert that wherever you want the text to show up, and you're done.

    EDIT: Oh yeah.... IBflames
     
  8. PBizme

    PBizme I Got Nothing

    Joined:
    Jan 27, 2002
    Messages:
    729
    Likes Received:
    0
    Location:
    Purdue
    I think the point is that he wants it to just display the current time unless there is some emergency that has happened. It would be easy with ASP or something.
     
  9. WERUreo

    WERUreo Imua!

    Joined:
    Oct 15, 2003
    Messages:
    566
    Likes Received:
    0
    Location:
    Daytona Beach, Florida
    If that's the case, then yeah, that Javascript is not what he wants. However, there are still simple Javascript functions that can display the current date and time. Something like this for example. Still no need to install ASP when this kind of thing can be done client-side.
     
  10. IAMwhitey

    IAMwhitey New Member

    Joined:
    Nov 8, 2001
    Messages:
    1,010
    Likes Received:
    0
    Location:
    Pittsburgh, PA
    i just asked if he had those resources available, I would write the ASP for him no big deal. I read it like you did, PBizme. I thought it was supposed to display the current time until something happens to know that the page is always updating and working
     
  11. WERUreo

    WERUreo Imua!

    Joined:
    Oct 15, 2003
    Messages:
    566
    Likes Received:
    0
    Location:
    Daytona Beach, Florida
    Yeah, if he's already got ASP installed, then sure, may as well use it. Hell, if he had PHP installed, I'd offer to write that for him too. I was just saying that if he doesn't have ASP installed, there's no point installing it if the only thing he needs it for is this date thing, whatever his exact needs may be. Inserting Javascript is as simple as cut and paste.
     
  12. Alt+F4

    Alt+F4 official OT hockey stud

    Joined:
    Dec 13, 2001
    Messages:
    3,790
    Likes Received:
    0
    Location:
    Manchester, NH
    This conversation would be so much easier if I knew wtf PHP and ASP did, and how to code it. Forgive my ignorance when it comes to server side extensions and shit.

    Basically I don't want to have to touch the page at all on a daily basis. Dinosaur Bossman wants me to come in every morning, and aside from all the other shit I have to do, and change the date in the html file. Pain in my ass, and I always forget. If I could have something where it would change the date to today's date, then change the time to some random time between 7:30 and 8:15, that'd be tits. I just changed it by hand yesterday...last time I did it was early September, and he's on my balls all the time about it.

    If it helps, here's the page exactly:

    http://sau21.k12.nh.us/superintendent/emerstatrep.html
     
  13. Javi

    Javi New Member

    Joined:
    Sep 13, 2004
    Messages:
    37,785
    Likes Received:
    0
    Location:
    Houston, TX
    Code:
    <script type="text/javascript">
    var d=new Date()
    var weekday=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
    var monthname=new Array("January","Feburary","March","April","May","June","July","August","September","October","November","December")
    document.write(weekday[d.getDay()] + ", ")
    document.write(monthname[d.getMonth()] + " ")
    document.write(d.getDate() + ", ")
    document.write(d.getFullYear())
    </script>
    
    Insert that where you have written the date.

    I wouldn't worry about the time, most people won't notice.
     
  14. Alt+F4

    Alt+F4 official OT hockey stud

    Joined:
    Dec 13, 2001
    Messages:
    3,790
    Likes Received:
    0
    Location:
    Manchester, NH

    You ROCK. Thanks!
     

Share This Page