I have the following scenario with the form bellow:
<form action="action.php">
<input type="text" id="input1" name="input2">
<input type="text" id="input2" name="input2">
<button type="button" class="btn btn-lg btn-danger" data-toggle="popover" title="Popover
title" data-content="You don't have permission to press button">Button</button>
</form>
I need some Javascript code that says: if input1=input2 submit form else popover title saying "You don't have permission ". I tried some stuff based on some search on the internet but it didn't really work