0
Good afternoon guys, all right?
I received an internal project and I’m not getting to finish.
I have this excerpt from an HTML page:
    <span style='font-size:9.0pt;
    font-family:"Calibri",sans-serif;
    color:black>'>
    Apresente este QRCode no terminal de autoatendumento. Ele também está anexo. <BR>
    Identifique-se na <b><span style=font-size:11.0pt;>%%nomePortaria%%</b>, conforme ilustração abaixo.
    </span></span></p>
Just below this excerpt, is displayed a gif of the ordinance selected through the code below:
    <p align=center>
    <img name="imagem1" width=360 height=208>
    </p>
The question is: I need the gif to be changed according to the parameter passed in the %%namePortaria%% variable. I created this very simple code to see if it would work, but it didn’t roll...
<script>
function srcImage(path) {
    document.imagem1.src = path;
}
window.onload = function() {
    if(%%nomePortaria%%  == 1){
        srcImage('85.gif');
    } 
    else if(%%nomePortaria%% == 2){
        srcImage('86.gif');
    }
    else{
        srcImage('84.gif);
    }
}   
</script>
The images are in the same file folder, just for testing... in the future, I will change the paths to a correct image url.
Thank you guys!
Note that this variable is coming from a backend, correct?
– Jorge.M
This... is that actually I do not have access to the backend... just passed me this code and asked to do this... :/
– Arildo Gomes