In my button Save event, I have to ask the user if they have something else to do before they proceed with the save. The below js seems to execute, but doesn't return back to the event (and proceed) if I choose Cancel and I don't get my screen back if I answer OK. Am I doing something incorrect with the function?
Here is my server side code inside the Save button event:
<code>
if (tsPatientDemographics.SelectedTab.Text == "Pri Ins")
{
String s = "Sec_Ins()";
ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "Secondary Insurance?", s, true);
}
</code>
Here is my js code:
<code>
function Sec_Ins() {
if (confirm("Is there Secondary or Tertiary Insurance information available?") == true) {
selectSecTab();
return false;
}
else
return true;
}
function selectSecTab() {
var tabStrip = $find("<%= tsPatientDemographics.ClientID %>");
var tab = tabStrip.findTabByText("Sec Ins");
tab.select();
}
</code>