简体   繁体   中英

Tibco SPOTFIRE 7.5 how execute a custom script on load of analisys

I have to execute a script on load of an Spotfire analisys. I used this method:

JScript :

 $(function () { function executeScript() { $('#hiddenBtn input').click(); } $(document).ready(function(){executeScript()}); }); 

HTML:

 <Span style="display:none" id="hiddenBtn"> <SpotfireControl id="f8322a6109af43fb935ad6e7bcb1f1fc" /></span> 
IronPython script on HiddenButton:

 if Document.Properties["OpenedYet"] == False: Document.Properties["OpenedYet"] = True ## Script you are trying to run on open here 

BUT

the event $(document).ready() FIRE continuously and script was executed continuously. I tried with $(document).load() or $(window).load() but the event was never fired. There is a way to execute a script ONCE on load?

Actually it might be better to use a hidden input field in order to change the document property and thus to trigger the python script.

Have a look here ...

and also here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM