I click submit button before test time is completed So I show a confirm message "Do you want to really Quit this test" and I click the submit button when Time is completed (Time left is 00:00:00) through javascript, but then also it asks user with confirm message Which I do not want to show on completion of time, How can I achieve this? This is my button
<asp:Button ID="btnSubmit" class="btn" runat="server"
OnClientClick="return confirm('Do you want to really Quit this test');" Text="Submit Test"
OnClick="btnSubmit_Click" />
This is javascript through which I call Click event when test time is over
<script type="text/javascript">
function
display() {
var hours = document.getElementById('<%=HidH.ClientID %>');
var minutes = document.getElementById('<%=HidM.ClientID %>');
var seconds = document.getElementById('<%=HidS.ClientID %>');
if (hours.value == 0 && minutes.value == 0 && seconds.value == 0) {
alert("Time Given For this Test is Over");
document.getElementById('btnSubmit').click();
}
}
</script>