Nick Harwy Nick Harwy - 10 months ago 28
HTML Question

How to go through the link in html?

I have a little question. in my html page i have a text box, where i can type

anything i want
. When i press ENTER i want to go through the next url
Is there eny methods to do this in html code?? Here the code

{% extends 'finder/base.html' %}
{% block content %}
<div class="container">
<div class="image"></div>
<h2>Super Search Engine</h2>
<p>I'm searching for:</h2>
<input type="text" id="inp" onkeypress="return runScript(event)">

function runScript(e) {
if (e.keyCode == 13) {
//var tb = document.getElementById("scriptBox");
//return false;
method: 'POST',
url: '',
data: {
'request': document.getElementById('inp').value,
success: function(data){
$scope.key = data['key'];
$scope.isAuthorized = true;
$window.alert('You are logged in.');
error: function(data){
$window.alert("Something was wrong.");
{% endblock content %}


If you want to reload from the new URL, assign to window.location instead of sending an AJAX request.

if (e.keyCode == 13) {
    window.location = "" + encodeURIComponent(;