Solved

Update DIV tag with AJAX using a timer

Posted on 2010-09-07
1
455 Views
Last Modified: 2012-05-10
Hi

I am new to Ajax and getting there, but am now stuck !

I have created a web service that can be called by Ajax to return a value. What I want now, is a timer to call that web service at a fixed interval

What I have done, works perfectly when you click a button, it calls the javascript function, which calls the web service and updates the value

I have done this by putting this into the Page_Load on the asp.net: ListBox1.Attributes.Add(@"onchange", "GetNotificationsCount('value');");

I have searched the internet and everything related to Timers seems to involve UpdatePanels and I can't work out how to get that to then link to a javascript function

So, what I need, is a timer that will call the GetNotificationsCount function at a defined interval, is this possible, if so how ?

Thank you very much
0
Comment
Question by:seancurt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 18

Accepted Solution

by:
Anil Golamari earned 500 total points
ID: 33622191
http://forums.asp.net/p/1377285/2901229.aspx ( Sample code)

http://dotnetslackers.com/columns/ajax/ASPNETAjaxWebService.aspx ( sample web service example which implement timer)

Hope these links helps you.

Good Luck
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question