Not able to click on hyperlink without seeing a warning message fired by "onbeforeunload event". Please suggest. Below are the details.
Thanks.
I am using <td><a id="profileLink" runat="server">View Profile</a></td>
which opens a popup to show profile based on usersID, I am setting the "OnClick" propert at the server side as :
1 profileLink.HRef = "#"
2
3 profileLink.Attributes.Add("onclick", "ShowPopup('ShowProfile.aspx?UserId=" & 1 & "');return false;NoPrompt();")
4
I used NoPrompt() to disable the firing of the javascript function "confirmExit" which is called by "onbeforeunload event" as below to warn user if they want to leave the page without save.
NoPrompt javascript function sets the flag to false so that confirmExit doesnot warn user when user click "View Profile link"
window.onbeforeunload = confirmExit;