Results 1 to 4 of 4
  1. #1
    morgenmuffel
    Join Date
    Dec 2004
    Location
    Putaruru
    Posts
    2,905

    Default javascript updating page, Javascript help

    Hi all

    I currently have a dynamically generated page (php) where my client adds pictures as part of an online course,

    What i want is that when the teacher adds a new image (every 5 - 10 mins or so) for the pupils pages to update,

    Currently what I have is a meta tag refresh that refreshes the pupils page every 5 minutes

    now because the page is dynamically generated (shows the 2 most recent images), i think checking it with javascript would create the same sort of server work as the meta tag refresh, So i had the cunning plan that i could use javascript to check the images directory, and when a new image was added it would refresh the page, or even make a "refresh" button appear on the page
    The images are numbered as they are uploaded so the first image uploaded will be image1 the next would be image2 etc,

    Now i dont really understand javascript or its abilities, but I thought to tackle this one of 2 ways
    get the javascript to check the number of items in the images directory (and store it as a variable), when it increases, the page refreshes
    get the javascript to check the most recent creation date in the images directory (and store it as a variable) and when a newer date appears refresh the page

    If any one can help i would be exceedingly grateful

    Cheers
    Nigel
    Morgenmuffel - This word needs to be a part of the english language, in fact you should use it in everyday conversation

  2. #2
    morgenmuffel
    Join Date
    Dec 2004
    Location
    Putaruru
    Posts
    2,905

    Default Re: javascript updating page, Javascript help

    Ok even if you don't know how to do this, but you know a good (read idiots) guide to javascript refresh check/function let me know

    as I'm reading through dozens of links and not finding it

    Cheers
    Morgenmuffel - This word needs to be a part of the english language, in fact you should use it in everyday conversation

  3. #3
    Peripatetic member
    Join Date
    Dec 2004
    Location
    Dunedin & Central Otago
    Posts
    2,795

    Default Re: javascript updating page, Javascript help

    Not much luck here, eh Nigel?
    Maybe a bump would help...

  4. #4
    Elite
    Join Date
    Feb 2005
    Location
    Dunedin
    Posts
    1,597

    Default Re: javascript updating page, Javascript help

    At a guess you probably want to use something like XMLHttpRequest.
    --
    Me pics

Similar Threads

  1. Replies: 6
    Last Post: 04-09-2008, 12:25 PM
  2. Javascript help
    By somebody in forum PressF1
    Replies: 7
    Last Post: 06-07-2004, 07:38 PM
  3. Why can't I open a javascript page?
    By Chris Randal in forum PressF1
    Replies: 6
    Last Post: 11-05-2004, 07:31 PM
  4. javascript
    By in forum PressF1
    Replies: 2
    Last Post: 06-02-2002, 11:43 PM
  5. Replies: 2
    Last Post: 01-07-2001, 09:42 AM

Posting Permissions

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