**Page <input type="text" id="page#" value={{Page_id}} style="width:50px; display:inline-block" > out of {{total}}
<input type="button" class="btn btn-outline-success" onclick="getDirection()" value="Go" style="display:inline">
<script>
function getDirection(){
var input = document.getElementById("page#").value;
var new_id ="http://159.203.172.178/page/{{current_page.id_tei}}" ;
new_id = new_id.slice(0,-3);
new_id = new_id+input;
console.log(new_id);
window.location=new_id;
}
** Hello, I am new to javascript. I am trying to make my django application take input from users and turn to the page based on their input. Right now, it works when I click on the button "Go". Is there a way I can make it work when I hit Enter key as well? I tried to use EventListener, but it tells me EvetListener is not a function. Great thanks.