Solved

Update DIV tag with AJAX using a timer

Posted on 2010-09-07
1
453 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
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

809 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