Based on your question I understand that- You need your field validations should occur first and then script should execute.
You can call Page_ClientValidate
() in your client script to explicitly execute all validations and if it successful then only Client Script should be executed.
Here is a small demo on the same:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" language="javascript">
function ClientScript() {
if (Page_ClientValidate("qa"))**// first check the validators in ValidationGroup "qa"**
{
alert("Save all Modification?");
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ValidationGroup="qa" runat="server" ControlToValidate="TextBox1"
Text="*" ErrorMessage="Value in Textbox1 is required!">
</asp:RequiredFieldValidator>
<asp:Button ID="Button1" runat="server" ValidationGroup="qa" Text="Test Validation" OnClientClick="ClientScript()" />
</div>
</form>
</body>
</html>