Hi all,
I am a newbie in javascript. I am developing an application where I have an html table displaying the records from the database. Each row has a check box and on clicking it and pressing delete button, the corresponding record gets deleted from the database. What I am trying to do is, when the user selects a record and clicks delete button a confirm window should pop-up asking for confirmation. also, if the user clicks delete without selecting any record, an alert window 'check the records to delete' should appear.
Here are the form tag and javascript code:
//form tag in index.jsp
<form name="del" id="frm" action="DeleteRecord">
<input type="submit" name="sub" value="Delete" onClick="validation();">
</form>
//javascript code in index.jsp
In the above code, the control will be transferred to
servlet whatever is the user action. Please help me in modifying above code.
Thanks in advance.