Home Page Notification

Discussion in 'Web Design' started by arsb, Aug 6, 2014.

to remove all ads.
  1. arsb

    arsb New Member

    Messages:
    1
    Is there any way to put a notification link on a webpage that indicates new content to be viewed?

    Basically I created an internal website using Microsoft Front Page and some js. We have an Announcement page and I would like a notification on the home page that indicates there is a new Announcement. If possible when the user clicks on the New Announcement link it will take them to the Announcement page but I would like New Announcement link to disappear once clicked on.

    I'm not very experienced with this so maybe it isn't even possible.

    Thanks!
     
  2. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,611
    Server side code is needed to make it 'automatic', other than that keep the anouncement URL the same and just change the content, then update the 'home' page with the date it was changed.
     
  3. lionel.web

    lionel.web Member

    Messages:
    95
    It doesnt need server side.
    It can be done with client side code, javascript.

    DO u have any link for your project?
    I can help u, if i see it online.
     
  4. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,611
    Please do tell, how exactly can that be done??
     
  5. ronaldroe

    ronaldroe Super Moderator Staff Member

    Messages:
    1,223
    Chris, I think you're thinking more along the lines of an RSS type-deal. This could be done per user with JS using either cookies or the localStorage API. For instance, we could have a date stamp in a data attribute that is matched against the date in a cookie. I'm not sure how you'd accomplish that in Frontpage, though. Of course, I'm not sure how one accomplishes anything in Frontpage...
     
  6. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,611
    Not really, Even if the pages are individual entities in hard coded HTML, the only way to find if one has been 'updated', needs server side code to check the "last modified date" of all the files and display the URLs on the 'home' page.

    To use javascript to display the "updated" documents list is NOT possible, javascript has NO server access to read site documents OTHER than the one it is currently displaying.

    Even if you had a cookie that had every document on the site listed AND the date and time that browser last visited them you could not find which of them had been updated before that document URL was requested.
     
  7. ronaldroe

    ronaldroe Super Moderator Staff Member

    Messages:
    1,223
    That is, unless, and I'm making an assumption here, at least the latest article is on the main page.

    I know you and I would build it out in a way that could be seen on every page, and that would require server-side code to work. It's frustrating to think about not building it that way. However, the question asked was just for the home page. If the most recent article is on the home page, or at least a hidden element where the date were manually updated, it would be a simple matter of matching dates. We are talking Frontpage, after all...
     
  8. chrishirst

    chrishirst Well-Known Member Staff Member

    Messages:
    2,611
    The original post is fairly specific (for a change :) ) in that there is an "announcements" URL and the requirement is to display a notification if and when the document located at that URL has been updated.

    Nothing to do with "latest articles", RSS feeds or anything else, it is just one URL that is required to be monitored for changes and neither HTML or javascript can do that.
     
  9. ronaldroe

    ronaldroe Super Moderator Staff Member

    Messages:
    1,223
    Ah. I misread it.
     

Share This Page