Refreshing parts of a web site

Discussion in 'HTML' started by John, Sep 26, 2007.

  1. John

    John Guest

    Hi,

    Is there any way to update only a single object on a
    web page (without using frames)? For instance a
    picture that will change on a server depending on
    some (server-side) state, for example the weather.

    Just like an entire page can be refreshed, I want to
    refresh just an image. It's ok to use XHTML or Java
    script, although I don't know how to code it right now.

    Regards,
    John
     
    John, Sep 26, 2007
    #1
    1. Advertising

  2. John

    J.O. Aho Guest

    John wrote:
    > Hi,
    >
    > Is there any way to update only a single object on a
    > web page (without using frames)? For instance a
    > picture that will change on a server depending on
    > some (server-side) state, for example the weather.


    AJAX script that checks the server every X minute and change the content of a
    div if there is a change.



    --

    //Aho
     
    J.O. Aho, Sep 26, 2007
    #2
    1. Advertising

  3. John

    John Guest

    On 26 Sep, 19:40, "J.O. Aho" <> wrote:
    > John wrote:
    > > Hi,

    >
    > > Is there any way to update only a single object on a
    > > web page (without using frames)? For instance a
    > > picture that will change on a server depending on
    > > some (server-side) state, for example the weather.

    >
    > AJAX script that checks the server every X minute and change the content of a
    > div if there is a change.


    Thanks. I found and modified a JavaScript that updates a div tag. But
    right
    now I activate the JavaScript function that posts the form to the CGI
    script
    with a button. How can I make a script that lies in the background and
    calls my JavaScript update function once every minute or so?

    / John
     
    John, Sep 27, 2007
    #3
  4. John

    Neredbojias Guest

    Well bust mah britches and call me cheeky, on Thu, 27 Sep 2007 15:08:20
    GMT John scribed:

    > On 26 Sep, 19:40, "J.O. Aho" <> wrote:
    >> John wrote:
    >> > Hi,

    >>
    >> > Is there any way to update only a single object on a
    >> > web page (without using frames)? For instance a
    >> > picture that will change on a server depending on
    >> > some (server-side) state, for example the weather.

    >>
    >> AJAX script that checks the server every X minute and change the
    >> content of a div if there is a change.

    >
    > Thanks. I found and modified a JavaScript that updates a div tag. But
    > right
    > now I activate the JavaScript function that posts the form to the CGI
    > script
    > with a button. How can I make a script that lies in the background and
    > calls my JavaScript update function once every minute or so?


    Whatever the div-update code is, make it a function [say "divupdate()] and
    do something like this

    function repeatdivupdate() {
    setInterval("divupdate()", 60000)
    }
    repeatdivupdate();

    --
    Neredbojias
    Half lies are worth twice as much as whole lies.
     
    Neredbojias, Sep 28, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harlan Messinger

    Self-refreshing and non-self-refreshing controls

    Harlan Messinger, Aug 4, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    489
    =?Utf-8?B?Y2xpY2tvbg==?=
    Aug 4, 2006
  2. Replies:
    3
    Views:
    629
    Keith Thompson
    Mar 31, 2007
  3. Replies:
    1
    Views:
    980
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Apr 12, 2007
  4. kizk
    Replies:
    0
    Views:
    679
Loading...

Share This Page