adding confirm box
Here is my code and I want to add a confirmation box to it.
I have a form with two submit buttons. I need the confirmation box with them and then send to the next page. How can I do this?
this is the code for confirmation box,how can i place it in my form ?
onclick="return confirm('Are you sure?');"
myform.jsp
<form id="form1" name="form1" method="post" action="">
<p> </p>
<p align="center">Enter your choice:-
<label> <br />
<label>
<input type="submit" name="Submit" value="delete" onclick="this.form.action='logi.jsp?flag=1&act=1';this.form.submit();" />
</label>
<br />
</br>
<label>
<input type="submit" name="Submit" value="Delete" onclick="this.form.action='delete1.jsp?flag=1&act=1';this.form.submit();" />
</label>
<br/>
</div>
</form>
On button class try this