I am working in ServiceNow using a catalog request UI macro so I cannot call a PHP file. I want to have users enter an URL into an input field and automatically convert that to a hyperlink without hitting submit (basically when user leaves field).
I tried to put this together using javascript but I'm finding that I am having trouble with the code. The input field isn't even appearing on the page
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<script>
<input type="text" id="myAwesomeIdName"></input>
var val = document.getElementById('myAwesomeIdName').value;
<a href="&val;&" target="_blank">Link</a>
</script>
</j:jelly>