WCF/WF - calling WCF method continuously - Asked By asif hameed on 10-Feb-11 09:13 AM

Hi all:

I have an ajax enabled WCF service method :

 [OperationContract]
        public string Test(string name) 
        { return "testing testing." + name; }


and I am calling it with following code:

 $(document).ready(function () {
            var varData = $("#NewSkill").val();       
            $("#Button1").click(function () {

                $.ajax({
                    type: "POST",
                    url: "TimeService.svc/Test",
                    data: '{"name" : "Asif Hameed"}',
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: function (msg) {
                        alert(msg.d);
                    } 
                });
            });
        });

I want to call this method continuously after every 5 seconds using above code . How can I do this ?

Regards,
Asif Hameed