refresh page without click sound

Discussion in 'ASP General' started by JJ, Jun 11, 2004.

  1. JJ

    JJ Guest

    Hi,
    I am writing a web chat facility in asp.
    The problem is that my chat screen has to refresh every 10 seconds to check
    for any new messages in the conversation, this causes a 'click' sound.
    How can you refresh a page with out a 'click' sound? I currently use the
    meta refresh method, but there must be a different way, as other html chat
    clients I have seen do not make the 'click' sound and do not appear to use
    the meta refresh method.
    Thanks
    JJ
     
    JJ, Jun 11, 2004
    #1
    1. Advertising

  2. JJ

    dlbjr Guest

    Use JavaScript and XML HTTP to make a call back to the server and receive the newest data then just
    append the new data to the bottom of the text in the screen. Why refresh the whole page every time?

    'from dlbjr

    'Unambit from meager knowledge of inane others,engender uncharted sagacity.
     
    dlbjr, Jun 11, 2004
    #2
    1. Advertising

  3. JJ

    JJ Guest

    Hi,
    Thanks for that...
    any urls which might explain how to do this?
    Thanks
    JJ
    "dlbjr" <> wrote in message
    news:%...
    > Use JavaScript and XML HTTP to make a call back to the server and receive

    the newest data then just
    > append the new data to the bottom of the text in the screen. Why refresh

    the whole page every time?
    >
    > 'from dlbjr
    >
    > 'Unambit from meager knowledge of inane others,engender uncharted

    sagacity.
    >
    >
     
    JJ, Jun 11, 2004
    #3
  4. JJ

    dlbjr Guest

    <script language="javascript" >
    //Set how often to update
    var intsecods = 1;
    //Set the url to get data from
    var url = "http://www.mamma.com"

    var x=setInterval("update()",1000 * intsecods)

    function update() {
    var http = new ActiveXObject("Microsoft.XMLHTTP");
    try{
    http.Open("GET",url,false);
    http.send();
    if(http.readyState==4) {
    data1.innerHTML = http.ResponseText
    }
    }
    catch(e){
    if(e instanceof Error) {
    data1.innerHTML = "no connection";
    }
    }
    }
    </script>
    <html>
    <head>
    <title></title>
    </head>
    <body>
    <div id="data1">
    </div>
    </body>
    </html>


    //from dlbjr

    //Unambit from meager knowledge of inane others,engender uncharted sagacity.
     
    dlbjr, Jun 12, 2004
    #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. Henrik H
    Replies:
    1
    Views:
    647
    Scott Allen
    Oct 25, 2004
  2. Lenny Shprekher
    Replies:
    0
    Views:
    2,333
    Lenny Shprekher
    Feb 23, 2005
  3. Luc The Perverse

    Sound Quality In Sound API

    Luc The Perverse, Oct 30, 2005, in forum: Java
    Replies:
    4
    Views:
    1,490
    Andrew Thompson
    Oct 31, 2005
  4. Replies:
    0
    Views:
    507
  5. Pkenty
    Replies:
    0
    Views:
    400
    Pkenty
    May 28, 2004
Loading...

Share This Page