<pre name="code" class="javascript"> <span style="color: rgb(58, 62, 67); font-family: 'Segoe UI Semibold', 'Segoe UI', 'Lucida Grande ', Verdana, Arial, Helvetica, sans-serif; font-size: 22px; line-height: 27px; ">GetResult is also available in .net. If used together with .net, it will cause an error that it cannot be called. </span>
Therefore, the name of the getResult() js method below needs to be changed to another name so as not to cause other ambiguities!
//Scheduled refresh flag<br>var refreshid="";//Note that it is defined as a global variable<br>function felsh(){ <br>//alert("Timed calling method starts"); <br>refreshid=setInterval(getResult,1000); <br>} <br>//Called method<br><br>function getResult(){ <br>try{ <br>var str=addFunctionName();//return 1 if unsuccessful <br>if(str=="1"){ <br>return str; <br>} <br>clearInterval(refreshid) ;//Clear the timing service after success<br>}catch(e){ <br>alert('Exception:' e.description); // or alert('Exception:' this.print(e));// The advantage is that you can print out typing errors <br>} <br>return ""; <br>} <br>function addFunctionName(){ <br>return "1"; <br>}
< br>