tag:blogger.com,1999:blog-1078032318127767231.post5354874661272716434..comments2024-03-20T01:42:16.872-05:00Comments on Spotfire Developer: Trigger script when clicking on a tabJose Leviaguirrehttp://www.blogger.com/profile/12377756211132280060noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-1078032318127767231.post-51724273943293270342020-05-05T19:13:51.917-05:002020-05-05T19:13:51.917-05:00The above comment is not true. Switch your control...The above comment is not true. Switch your control from a link to a <b>button</b>, and use $('#hiddenActionControl <b>input</b>').click(); <br /><br />This has been tested in 10.3.3.<br /><br /><br /><b>html</b><br /><br /><br />*format your DateTime document property to display ms<br /><br /><b>js</b><br />//executes every time the text area renders<br />$('#hiddenActionControl input').click()<br /><br /><b>script</b><br />#this script is triggered by the javascript associated in the text area through a hidden action control button.<br /><br />from System import DateTime<br />#Retrieve the current datetime<br />Document.Properties["docPropLabel"] = DateTime.NowJolenehttps://www.blogger.com/profile/09627716979257179854noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-8761520713559622682020-01-13T05:53:17.566-06:002020-01-13T05:53:17.566-06:00Unfortunately, this is no longer feasible in Spotf...Unfortunately, this is no longer feasible in Spotfire version 10.3<br />You could switch action control from link to button for it to work a bit, but since the recent update, even use of action control button doesn't deliver trigger.Anivar Melayahttps://www.blogger.com/profile/09198917552714805764noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-13199342184043721142017-02-08T17:27:47.396-06:002017-02-08T17:27:47.396-06:00@alirulzz, That is an iron python script that is t...@alirulzz, That is an iron python script that is triggered when the tab is clicked. So, every time the tab is clicked, or I should say, switched from a different tab, the page will render a text area causing the javaScript to run. JavaScript will then trigger the Spotfire script. In this example, it increments a document property.Jose Leviaguirrehttps://www.blogger.com/profile/12377756211132280060noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-11452324114725374932017-02-08T14:54:59.238-06:002017-02-08T14:54:59.238-06:00where does the following go:
script
#this script ...where does the following go:<br /><br />script<br />#this script is triggered by the javascript associated in the text area through a hidden action control link.<br />Document.Properties["tabCount"] = Document.Properties["tabCount"] + 1<br /><br />Thank you.alirulzz@gmail.comhttps://www.blogger.com/profile/16405244441010789376noreply@blogger.com