sam sam - 1 year ago 80
Ajax Question

Calling HTML function from WCF service

I have a callback in WCF service, which receives the raw frames from the camera. Now I am writing a HTML application that displays these frames.

But, as of now, I use a button click event in HTML to get the current frame from WCF service(using ajax). I would like to get the frames continuously with a single button click event. Any ideas on how to do so?

Thanks in advance.

Answer Source

No, you would need your JavaScript to repeatedly call your web service.

You can't just get a WCF service to return some results, then every few seconds later, return some (updated) results.

//  Call a web service, once every 3 seconds.
setInterval(function() { 
    //  Call your WCF service here
}, 3000);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download