I'm writing a small chat application in asp.net, which currently looks similar to msn in that there is a top frame with the messages, and a bottom frame with a textbox for entering new messages. I need the content of the top frame to automatically update every few seconds.
I have written a small javascript function which refreshes the page every 3 seconds, which works fine but each time the page reloads, you get an audible "click".
So what I want to do is get the content to automatically refresh without actually reloading the page. I don't want the user to have to do anything, such as click a button, to refresh the message list.
I did update the javascript to use innerHTML, however, obviously the page only gets the data from the session (will be from a db once its working) when it first loads, so I'd still need to reload the page.
I have found and used a javascript function in the past that executes asp in the background, however, I can't remember what this function was and can't find it now, and it was done at a previous company so I can't get the code.
Is there a way in ajax to do this?
I have written a small javascript function which refreshes the page every 3 seconds, which works fine but each time the page reloads, you get an audible "click".
So what I want to do is get the content to automatically refresh without actually reloading the page. I don't want the user to have to do anything, such as click a button, to refresh the message list.
I did update the javascript to use innerHTML, however, obviously the page only gets the data from the session (will be from a db once its working) when it first loads, so I'd still need to reload the page.
I have found and used a javascript function in the past that executes asp in the background, however, I can't remember what this function was and can't find it now, and it was done at a previous company so I can't get the code.
Is there a way in ajax to do this?