Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 475
  • Last Modified:

Update DIV tag with AJAX using a timer

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
seancurt
Asked:
seancurt
1 Solution
 
Anil GolamariCommented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now