<input type="text" oninput="mylink.href = this.value ? mylink.getAttribute('data-link') + this.value : '#';" /> <a id="mylink" href="#" data-link="/index.php?option=com_billing&sum=">Mylink</a>