On confirm the function is called but it skips the HTML5 validation and just redirects. As of now the page is static, no other validation is there.
<label> Email :</label>
<input type="email" class="form-control" id="new_email"
placeholder="Enter Email" required autofocus
autocomplete="off" style="width:300px;"/>
<script type="text/javascript">
function submitdetails() {
if(confirm("Do you want to proceed") == true) {
document.write("Creating your Account, please wait...");
setTimeout('window.location = "confirm.html";',5000);
} else {
document.write("Redirecting to home page, please wait...");
setTimeout('window.location = "new_fss.html";',5000);
}
}
</script>
HTML :
<button type="submit" class="btn btn-primary" style="width:100px;margin-left:50px;" onclick="submitdetails();">Submit</button>
Any suggestions?