Jump to content

How to replace images in a text area using action control


Maria Yaroshenko

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...