Variable with JS / Html

-1

Who can help,

I need to mount an email signature where the image link I need to load was composed and inserted into a JS linkAss.

I can not load the image inside the HTML (Link Variable).

How can I do this?

<html>
<head>
<title>Empresa</title>
<link href='http://fonts.googleapis.com/css?family=Raleway:500,700,900,400,300' rel='stylesheet' type='text/css'>
<style>
html, body { font-family: 'Raleway', sans-serif; }
</style>
</head>
<script type="text/javascript">
var linkAss = "https://wp.net/ImagensAss/" + %%userPrincipalName%% + ".png"
</script>
<body>
<table cellspacing="0" cellpadding="0" width="" border="0">
<tr>
<td width="100" style="vertical-align: top;">Variavel do Link</td>
    
asked by anonymous 06.06.2018 / 19:25

1 answer

0

Is that it?

    <html>
    <head>
    <title>Empresa</title>
    <link href='http://fonts.googleapis.com/css?family=Raleway:500,700,900,400,300' rel='stylesheet' type='text/css'>
    <style>
    html, body { font-family: 'Raleway', sans-serif; }
    </style>
    </head>
    <script type="text/javascript">
    function load(){
      var userPrincipalName = "name";
      var linkAss ="https://wp.net/ImagensAss/"+userPrincipalName+".png";
      document.getElementById('link').src = linkAss;
    }
    </script>
    <body onload="load()">
    <table cellspacing="0" cellpadding="0" width="" border="0">
    <tr>
    <td width="100" style="vertical-align: top;"><img src="" id="link"></td>
    </tr>
    </table>
    </body>
    </html>
    
06.06.2018 / 19:39