This should be very simple
<FORM NAME=makelink>
Copy the voucher code: <input type=TEXT name=voucher onchange=makethelink() size=26>
<input type=button value="Link aufbauen" onclick=makethelink()>
</FORM>
<script language="JavaScript">
function sete(e,h,v){if(!v){v=mt[h]}try{document.getElementById(e).innerHTML=v}catch(e){}}
function makethelink()
{ with (document.makelink) {
var link = "https://www.example.com/ecom/gb.php?c=cart&i=1168918&cl=202501&ejc=2&discount_code=" + voucher.value;
var html = link + '<br><br><a href="'+link+'" target=_blank>Download Link</a>';
sete('for_link', '',html );
alert ( html );
}
}
</script>
<span id=for_link></span>
But there is only "Download link" without link. So I inserted the alert to view waht happens. In the alert is also not the <a href for the link.
I tried what happens when I write <span style= instead of <a href=
The alert shows like expected the variable html.
But when I put <a href, the alert does not show this.
Any idea what went wrong with this very simple script?
I tried with simple links <a href=http://mysite.com>download link</a>
and it works like expected.
It only refuses to work with the online shop link and I have no idea why