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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a server-side script (asp) in background from Javascript

Status
Not open for further replies.

theomen

Programmer
Jun 2, 2004
158
GB
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.
 
This would probably be a better place to ask your question, as an AJAX solution would probably be optimal:

forum1600

-kaht

[small](All puppies have now found loving homes, thanks for all who showed interest)[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top