Am trying to redirect to another html document when a button is clicked. This is my js code:
$('#getTextBoxValue').on("click", function(){
var value = $("#textbox1").val();
});
$('#getTextBoxValue').click(function() {
window.location.href = 'view.html';
return false;
});
And this is my html code:
<form class="col-lg-12">
<div class="input-group" style="width:500px;text-align:center;margin:0 auto;">
<input class="form-control input-lg" placeholder="Enter single quote-surrounded link" type="textbox" id="textbox1"></input>
<span class="input-group-btn"><button class="btn btn-lg btn-primary" type="submit" id= "getTextBoxValue">Submit</button></span>
</div>
</form>
<script src="js/script.js"></script>
<script src="js/viewer.js"></script>
Nothing happens when I click the button though, is there a better way to do this?