It would be possible to get the value of the variable within a <% = =>
<script>
function displayResult() {
var x = document.getElementById("Test").value; # I need to get the value of this variable
var controller_checkoutdomain = "<%= inspect MyprojectWeb.RequestController.checkout_domain('x') %>"; # The problem is here, he can't get this variable X, because he is accessing a controller.
document.getElementById("myHeader").innerHTML = controller_checkoutdomain;
}
</script>






















