Maria Yaroshenko Posted June 19, 2019 Share Posted June 19, 2019 Hello, I am new to Spotfire, need some help I have a text area with three images on it placed in the table. I am trying tocreate an action control button located on the different tabto replace all three images with three different images from my local drive (using IronPython). My html: Thanks! Link to comment Share on other sites More sharing options...
Shandilya Peddi Posted June 19, 2019 Share Posted June 19, 2019 Please refer to the below wiki article for an sample script on how to change images in a text area, https://community.spotfire.com/wiki/how-dynamically-change-images-textarea-tibco-spotfirer-using-ironpython-scripting I think you can add all your 6images to the HTMLTextArea.Imagesthen as needed replace the HTML content on action control click Link to comment Share on other sites More sharing options...
Maria Yaroshenko Posted June 19, 2019 Author Share Posted June 19, 2019 When testing the dxp attached to the article the resulting html is:<img src="Japan" style="border: 0; width: 102px; height: 100px;"/><SpotfireControl id="84ab62142ff443d1934adcd14f435664" /> Invalid src value "Japan"What am I doing wrong (I have France.png, Japan.png and Spain.png in C:Source) Thx! Link to comment Share on other sites More sharing options...
Shandilya Peddi Posted June 19, 2019 Share Posted June 19, 2019 When changing the value to "Japan" in drop down throws that error Link to comment Share on other sites More sharing options...
Maria Yaroshenko Posted June 19, 2019 Author Share Posted June 19, 2019 Initially it's trying to create a new image in the blank area based on my choice, it puts the name from dropdown into the src instead of substituting it with the scr value created in the images collection, so html generates an error. When i replace France with Japan it changes src="France" to src="Japan" which gives the same error. When i manually insert France.png from local drive it creates src="12eb34ae.....36b.png" instead of France.png and does not produce any errors until I run the script Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now