How can I display an image in a label field based on the value of another field?

[LEFT][SIZE=16px]Hello,[/SIZE][/LEFT]

[LEFT][SIZE=16px]I have a form type application, I need to show an image within a block based on the value that the user selects in a radiobutton field.[/SIZE][/LEFT][LEFT][SIZE=16px] [/SIZE][/LEFT][LEFT][SIZE=16px]These images are not in a database, they are part of the images of the project.[/SIZE][/LEFT]

[LEFT][SIZE=16px]I have managed to show the image when the form is loaded, but if the user changes its value in the radiobutton field, the image does not change.[/SIZE][/LEFT][LEFT][SIZE=16px] [/SIZE][/LEFT][LEFT][SIZE=16px]How can I make this work as I need to?[/SIZE][/LEFT]

[LEFT][SIZE=16px]This is the code that I inserted in the OnLoad event and it works correctly. [/SIZE][/LEFT]

if({status} == “0”){
{image} = “<img src=’…/_lib/img/grp__NM__img__NM__SemaforoVerde.png’ &gt;”;
}
elseif([LEFT][SIZE=13px]{status}[/SIZE][/LEFT] == “1”){
[LEFT][SIZE=13px]{image}[/SIZE][/LEFT] = “<img src=’…/_lib/img/grp__NM__img__NM__SemaforoApagado.png’ &gt;”;
}
elseif([LEFT][SIZE=13px]{status}[/SIZE][/LEFT] == “2”){
{image} = “<img src=’…/_lib/img/grp__NM__img__NM__SemaforoNaranja.png’ &gt;”;
}
elseif([LEFT][SIZE=13px]{status}[/SIZE][/LEFT] == “3”){
[LEFT][SIZE=13px]{image}[/SIZE][/LEFT] = “<img src=’…/_lib/img/grp__NM__img__NM__SemaforoRojo.png’ &gt;”;
}

[LEFT][SIZE=16px]For some reason that I do not understand yet, this code has only worked if the field is Label type.[LEFT][SIZE=16px] [/SIZE][/LEFT]I tried to use an HTML Image field, but the code does not work if the field is of that type.[/SIZE][/LEFT]

[LEFT][SIZE=16px]I tried to use an Ajax Event in the {status} field using this code, but the image does not change in the {image} field when the {status} field changes.[/SIZE][/LEFT]

[LEFT][SIZE=16px]Can you help me?[/SIZE][/LEFT]