Atozed Forums

Full Version: Bootstrap 4 + figure tag
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

I'm trying to use clickable image with <figure> tag. If I put a picture and clickable coordinates, everything works correctly.
The problem started when I tried to change picture with new clickable coordinates. Instead of replaced picture I'm getting a new picture below original picture. I'm attaching an example.
Can please somebody checked what I'm doing wrong?

Kind regards,
Bostjan


[attachment=431]
I got your project... but I'm failing to understand your requirements... you want just to replace pict1.png with pict2.png, in the same place where the other was, is that correct?
(11-02-2021, 10:56 PM)Alexandre Machado Wrote: [ -> ]I got your project... but I'm failing to understand your requirements... you want just to replace pict1.png with pict2.png, in the same place where the other was, is that correct?

Yes, that is correct. Also on first picture there are 2 clickable bars and on second should be 3 clickable bars.
(11-03-2021, 08:54 AM)bostjan Wrote: [ -> ]
(11-02-2021, 10:56 PM)Alexandre Machado Wrote: [ -> ]I got your project... but I'm failing to understand your requirements... you want just to replace pict1.png with pict2.png, in the same place where the other was, is that correct?

Yes, that is correct. Also on first picture there are 2 clickable bars and on second should be 3 clickable bars.

Hi, Alexandre,

any chance you managed to check my problem?

Kind regards,
Bostjan
Can please somebody help?
I got the image replacement working correctly. 

First I moved your pictures to the wwwroot folder. Do not use the Files folder anymore. This has been discontinued and part of its functionality is kept in new IW versions for backward compatibility only.

Second, the id of the image does not contain the IWCL suffix. It should be only:

  ATag.AddStringParam('id', 'IWBS4IMAGE1');

However, the trick that you are using to respond to a click event won't work correctly given that the link is not rendered at all when the page is rendered the first time.

A viable alternative is to replace it by a direct JavaScript call. Is that ok for you? If so, I can fix that

Please have a look at the demo attached.
(12-23-2021, 10:09 PM)Alexandre Machado Wrote: [ -> ]I got the image replacement working correctly. 

First I moved your pictures to the wwwroot folder. Do not use the Files folder anymore. This has been discontinued and part of its functionality is kept in new IW versions for backward compatibility only.

Second, the id of the image does not contain the IWCL suffix. It should be only:

  ATag.AddStringParam('id', 'IWBS4IMAGE1');

However, the trick that you are using to respond to a click event won't work correctly given that the link is not rendered at all when the page is rendered the first time.

A viable alternative is to replace it by a direct JavaScript call. Is that ok for you? If so, I can fix that

Please have a look at the demo attached.
Hi, Alexandre!

Thank you for fixing my code. And yes, I would like to know how to use direct JavaScript call for clickable areas to function even after I change picture?
I'll change it and get back to you...

thanks
(01-07-2022, 11:52 PM)Alexandre Machado Wrote: [ -> ]I'll change it and get back to you...

thanks

Hi, Alexandre!

It's been a while now. Any chance you manage to arrange replacement with direct Java calls?

Kind regards,
Bostjan
(03-15-2022, 11:11 AM)bostjan Wrote: [ -> ]
(01-07-2022, 11:52 PM)Alexandre Machado Wrote: [ -> ]I'll change it and get back to you...

thanks
Hi, Alexandre!

It's been a while now. Any chance you manage to arrange replacement with direct Java calls?

Kind regards,
Bostjan
Pages: 1 2