Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically refreshing a page without reloading it

Status
Not open for further replies.

theomen

Programmer
Jun 2, 2004
158
GB
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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top