Reputation: 1817
i am using this code
<a onclick="javascript:var t=setInterval("GetUpdates(5,ajaxResult)",300);">GetUpdates</a>
but getting the syntax error
Upvotes: 1
Views: 774
Reputation: 187110
Try
var t=setInterval(function(){GetUpdates(5,ajaxResult);},300);
You are including a double quote inside the onclick event handler which is causing the problem.
<a onclick="javascript:var t=setInterval(function(){GetUpdates(5,ajaxResult);},300);">GetUpdates</a>
Upvotes: 2