javascript to trigger an IronPython script to be executed on report load

I have the follwing javascript code that it triggers an IronPython script when I load the report.

The only issue I have is that for a reason I don't know it does it (it triggers the script) a couple of times.

Can some one help me? below is the script:

var n=0;

$(function () {

 function executeScript() {

     if (n==0){

        n=n+1;

        now = new Date();

        if (now.getTime()-$('#hiddenBtn input').val()>10000){

            $('#hiddenBtn input').val(now.getTime());

            $('#hiddenBtn input').focus();

            $('#hiddenBtn input').blur();

        }

     }

 }

$(document).ready(function(){executeScript()});

});

 

Please, let me know if you need more information. Thanks in advance!!!

 

Attachments

AttachmentSize
Binary Data test.dxp267.38 KB

(1) Answer

Login