cadwal01
asked on
Javascript Alert Popup on ItemUpdated
Need to have an alert fire after a formview updates. Here is the code I have which is not working.
script language='javascript' type='text/javascript'>
function confirmSelection()
{
if (Page_IsValid)
{
return confirm('Are you sure you want to delete this record?');
}
else
{
return false;
}
}
</script>
2. In your Page_Load event handler, add this line:
Me.fvLog.Attributes.Add("ItemUpdated", "return confirmSave()")
So say you have a button Update in your FormView EditItemTemplate to update then try this:
<asp:Button ID="btnUpdate" CommandName="Update" runat="server" OnClientClick="return confirm('Are you certain you want to update?');" Text="Update" />
<asp:Button ID="btnUpdate" CommandName="Update" runat="server" OnClientClick="return confirm('Are you certain you want to update?');" Text="Update" />
ASKER
I want to give the user confirmation that the record has been saved/added. They want a visual cue fro some reason. So this would be after the ItemUpdated event. Perhaps a hidden button with tthis code attached?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER