Hi All,
I am trying to build a quick chat program in ASP.NET. I've got two IFrames, the top one contains the messages, the bottom one a textbox for entering a new message. Its much like msn.
The problem I have is that to get the messages to refresh, I have a javascript function that just refreshes the top frame every 3 seconds. However, when it does this, you get the audible click from IE, which is pretty irritating.
So, I changed it so that the top frame has a textarea that gets updated with the messages (which are currently held in a session, but will be in a db). However, it obviously can't get the latest messages without refreshing the page, so this doesn't help.
In the past I've written some javascript which automatically runs an asp page in the background, which then sends some data to the calling page, so I could use this to execute an asp script to get the latest list of messages. However, I can't for the life of me remember how I did this, and it was at a previous company and I didn't take a copy of the code.
Can anyone tell me how you execute asp from javascript without reloading the current page?
Or, alternatively, how to stop the annoying click when the page loads (don't think this is possible as its an operating system thing).
Thanks.
I am trying to build a quick chat program in ASP.NET. I've got two IFrames, the top one contains the messages, the bottom one a textbox for entering a new message. Its much like msn.
The problem I have is that to get the messages to refresh, I have a javascript function that just refreshes the top frame every 3 seconds. However, when it does this, you get the audible click from IE, which is pretty irritating.
So, I changed it so that the top frame has a textarea that gets updated with the messages (which are currently held in a session, but will be in a db). However, it obviously can't get the latest messages without refreshing the page, so this doesn't help.
In the past I've written some javascript which automatically runs an asp page in the background, which then sends some data to the calling page, so I could use this to execute an asp script to get the latest list of messages. However, I can't for the life of me remember how I did this, and it was at a previous company and I didn't take a copy of the code.
Can anyone tell me how you execute asp from javascript without reloading the current page?
Or, alternatively, how to stop the annoying click when the page loads (don't think this is possible as its an operating system thing).
Thanks.