I have this simple form:
<form class="form-horizontal" >
<fieldset>
<!-- Text input-->
<div class="form-group" align="center">
<label class="col-md-4 control-label" for="textinput"></label>
<div class="col-md-4">
<input id="textinput" name="textinput" type="text" placeholder="Login " class="form-control input-md">
<span class="help-block"></span>
</div>
</div>
<!-- Password input-->
<div class="form-group" align="center" >
<label class="col-md-4 control-label" for="passwordinput"></label>
<div class="col-md-4">
<input id="passwordinput" name="passwordinput" type="password" placeholder="Senha " class="form-control input-md" >
<span class="help-block"></span>
</div>
</div>
<!-- Button -->
<div class="form-group" align="center" id=addCount>
<label class="col-md-4 control-label" for="singlebutton"></label>
<div class="col-md-4">
<button id="contador" name="singlebutton" class="btn btn-primary">Enviar</button>
</div>
</div>
</fieldset>
</form>
I need three alerts to be issued after submitting this form, on the fourth attempt, to go to the destination page. It's possible? Tried via javascript, but with no success.