My master web page contain JS code to override standard alerts with custom jQuery dialog boxes.
<script type="text/javascript" language="javascript">
window.alert=function(alertMessage)
{
$.msgbox(alertMessage, {type: "info"});
}
</script>
In default.aspx web page onLoad method I am trying to register and display alert script
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "InvalidPassword",
"alert(\"Your login attempt was not successful. Please try again.\");",
true);
Unfortunately it does not work. If I remove JS code which override alert box everything works fine, alert box appears. The override JS is correct, it is working fine if I execute alert js in client side, but it does not work if I try to execute code from server side.
Could anyone explain where is the problem?